Self Start

This is a good way to open a new process from a menu rather than using the Start in New Process checkbox, which doesn't allow you to name the process, set the stack, etc. The other way is to call a method which calls New Process to open the method you really want to run. Those poor menu method. They get used and thrown away in a single line. So, so sad.

So, in the method you want to run in its own process, all you have to do is put:
` BackgroundThingyMethod

If (SelfStart (Current method name))
End if
All you have to add is the If and End if statements, and poof! eet ees don.
  ` SelfStart
  ` Used to cause the calling method to re-run in a new Process
  ` $1 - Process name
  ` $2 - Method name (If not passed, the same as the process name)
  ` $3 - Delay in tics. In case you want to delay the new process a bit before 
  `         running.

  ` Example:
  ` If (SelfStart (Current method name;Current method name))
  `     Do some stuff
  ` End if  ` SelfStart


If ($NewProcessName>"!")
  If (Count parameters>=2)
    Repeat   ` Find out if the Process name starts with a non-letter designation
      If (Position($MethodName[[1]];"abcdefghijklmnopqrstuvwxyz")>0)
      End if 
    Until (($Loop>=3) | ($Done))
  End if 
  If (Count parameters>=3)
  End if 
  PROCESS PROPERTIES(Current process;$ProcessName;$ProcessState;$ProcessTime)
  If ($NewProcessName#$ProcessName)  ` This is not in its own Process
    $ProcessID:=FND_DoProcess ($MethodName;$NewProcessName)
    If (Application type#4D Server )  ` Don't use CALL PROCESS on the server
      CALL PROCESS($ProcessID)
    End if 
    DELAY PROCESS(Current process;$Delay)
  End if 
End if