GeneXus 9.0 Upgrade Course
From 9.0 and on, an object can be invoked not only by using call commands but also by using method syntax. When writing code, you receive help for this new syntax by being shown the invoked object parameters and types.
This avoids many mistakes when passing parameters, optimizes your work and makes development easier.
The following syntax is supported to invoke an object:
objname.CallMethod(parm1, ..., parmi);
Is the Object name to be called (including the prefix as detailed here)
Is the way to invoke the object. It can be a call, link, submit, udf/udp or create command or function. The CallMethod's color varies depending on whether it's a command (green), function (dark brown) or deprecated function (light brown).
Is the object list of parameters.
To include a call command into a source, you just need to write the object name, or include it from a dialog.
You may add a dot after the object name to display the available ways to invoke the object.
After selecting how to invoke the object by pressing ENTER, the object parm list appears if a parenthesis is included.
The parameter being edited is highlighted in bold.
Note: The BUSSINESS string refers to the platform (web, win or both) in conditional rules.
A rule can be generated only for an interface (win or web) or both (business).
What about UDPs?
When using UDPs, the last parameter (return parameter) must be left out. This doesn't change with this syntax, so if you use an UDP simply ignore the last parameter when calling.
The procedure called as an UDP has this rule:
parm(in:SerialID, out: &SerialLastNbr);
To invoke this procedure use:
CusCode=PSerializer.Udp("C") If Insert On Aftervalidate;
More about UDPs
About XPZ File Format
Commands are saved as they were written.
If the call(Program) syntax was used, the XPZ file includes call(program).
If the program.call() syntax was used, the XPZ file includes program.call().
About consolidating non-existing objects (from Beta 3 Build 483)
When an object which calls another object is consolidated and the called object doesn't exist, the "old" syntax is used and a warning is shown at consolidation log.
The message is like: "Could not find %s program. Call method changed to old syntax : %s"
Example: "Could not find 'PPrc01' program. Call method changed to old syntax : Call('PPrc01')."
Comments & Collaboration