Unofficial Content

Executes a GeneXus object or an external program within a Transaction. This rule can only be included in the Rules section of a Transaction object.

Syntax

Call('pgm', [ parm1, parm2 ,... ] ) [ If cond ];

Where:

'pgm
  Is the GeneXus object or external program that will be called when the condition cond is true. Use apostrophes or quotes to specify the external program's name.

parm1, parm2 ,...
  Are optional parameters that can be sent to the called object with a purpose. They must be received in the called object by declaring them with the Parm rule.

cond
  Is the condition that will be evaluated in order to call the pgm(true) or not (false). If cond is omitted, the rule will always be triggered.

Scope

Objects: Transaction

Samples

Example 1

The following transaction rule invokes a report that prints a Purchase Order immediately after executing the commit in the transaction where the rule is defined:

Call(RPtOrder, OrdNbr) on Aftercomplete;

Example 2

The following transaction rule invokes a report that prints a Purchase Order immediately after executing the commit in the transaction where the rule is defined. The name of the called object is loaded in a variable:

&Pgm = 'RPtOrder';
Call(&Pgm, &V1);

Example 3

The following transaction rule invokes an object defined in the KB. The name of the called object is stored in the attribute named: PgmName. All you need to do is to add the prefix ATT: to the name of the attribute that stores the name of the object you want to call:

Call(ATT:PgmName, parm1, parm2, …);

Two parameters are sent to the called object.

Note: We recommend using the Call method instead of this rule, excepting the case you need to indicate the name of the called object in a variable and you need also to define the invocation in the rules section of a transaction.

See Also

Call method
Call command
Udp method
Parm rule
Submit command
Submit rule
Significant object name length property
Expand dynamic calls property
Prefixes to use when calling and having to indicate explicitly certain definitions

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant