Using INVOKE in a Lawson 4GL Program
Only Lawson online-type programs can be activated by INVOKE. Programs activated by INVOKE must follow all the same rules as regular online programs. If an online program should be activated by INVOKE, you must set the Can Be Accessed By INVOKE attribute in Program Definition to Yes.
Because online programs possess up to nine separate transactions (forms), you must use the transaction code (the form ID) for the desired form to identify the logical entry point to a program. The form ID "GL01.1" is shown in the following example from the GL01.scr file.
* ELEMENT NAME
* LEVEL NAME TYPE LENGTH DEC REQ OC KN SC PICTURE
* ----- --------------------- -- ---- - -- -- --- - -----------------
$TRANS GL011 S
Form IDs identify the specific transaction in a program to execute. Only one transaction per program can be invoked at a time.
Note: At this time, INVOKE processing does
not include field editing, defaulting, or form rule processing that is implicit to using the
Lawson Presentation Manager (lapm) or the Lawson Portal. It is essential that all of the $TRANS
fields are correctly loaded or initialized before activating a program using an INVOKE
statement.