Call command

Official Content
This documentation is valid for:

Executes a GeneXus object or an external program synchronously.

Note: Use the Call method instead of this command, except for the case where you need to indicate the name of the called object in a variable..

Syntax

Call(GeneXusObjectName | 'pgm' | &var | ATT:Att  [, parm1, …, parmN] )

Where:

GeneXusObjectName
   
Is the name of the GeneXus object to be called.

'pgm'
   Is the name of the external program to be called. Use apostrophes or quotes.

&var
   Is a variable based on the character data type that contains the name of the GeneXus object to be called.

Att
   Is an attribute based on the character data type that contains the name of the GeneXus object be called, ATT: is a prefix that must be used.

parm1, …, parmN
   Are optional parameters that can be sent to the called object with some purpose (and they must be received in the called object by declaring them with the Parm rule.

Scope

Objects:   Procedure, Transaction, Web PanelWork Panel

Samples

1) Calling a GeneXus object (without sending parameters to it)

Call(CustomInfo) 

2) Calling an external program (without sending parameters to it)

Call('ExtPrg')

Check the considerations section for further detail.

3) Calling a GeneXus object, but the object name is loaded in an attribute (Att is the name of the attribute defined in the KB). Two parameters are sent to the called object.

Call(ATT:Att, parm1, parm2, …)

Check the considerations section for further detail.

4) Calling a GeneXus object, but the object name is loaded in a variable. Two parameters are sent to the called object.

Call(&var, parm1, parm2, …)

Dynamic Call considerations

  • The object name must exactly match the target object name; otherwise, you will get a runtime error. For example: in Java, all classes are generated as lowercase so you will need to set the Dynamic call as lowercase.
  • Do not use an expression for the first parameter in the Dynamic call, it only supports a variable or attribute name containing the object name.
  • Dynamic Calls to web objects are not supported in Procedures and Data Providers. Use for that the Link command. (More information at SAC 47097)


See Also

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