Invoke Function Steps
Invoke function steps may be used to retrieve or update data independent of the page currently being displayed. For example, if you design a script that takes different paths based on the customer's customer class, you could invoke a function to retrieve the customer's customer class.
The following additional fields are required for Invoke Function steps:
Function defines the name of the function. The function's Long Description is displayed below.
When a function is invoked, it will either be successful or return an error. The next two fields control the step to which control is passed given the outcome of the function call:
- If Success, Go to defines the step that is executed if the function is successful.
- If Error, Go to defines the step that is executed if the function returns on error. Refer to How To Use Constants In Scripts for a list of the global variables that are populated when a function returns an error.
The Send Fields grid defines the fields whose values are sent to the function and whose field value source is not Defined On The Function. For example, if the function receives an account ID, you must define the name of the field in the script that holds the account ID.
- Field contains a brief description of the field sent to the function.
- Source Field Type and Mapped Field / Value define the field sent to the function. Refer to the description of Source Field under How To Set Up Move Data Steps for a description of each field type.
- Comments contain information about the field (this is defined on the function).
The Receive Fields grid defines the fields that hold the values returned from the function. For example, if the function returns an account's customer class and credit rating, you must set up two fields in this grid.
- Field contains a brief description of the field returned from the function.
- Destination Field Type and Mapped Field define the field returned from the function. Refer to the description of Destination Field under How To Set Up Move Data Steps for a description of each field type.
- Comments contain information about how the field (this is defined on the function).