How To Set Up Invoke Function Steps

Invoke function steps are 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. Doing this is much more efficient than the alternative of transferring to the account page and retrieving the customer class from the Main page.

Fastpath: You must set up a function before it can be referenced in a script. Refer to Maintaining Functions for the details.

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:

Note: Error technique. If a function returns an error, we recommend that you invoke a step that transfers control to a script that displays the error message information and stops (note, the error information is held in global variables). You would invoke this script via a Transfer Control. The demonstration database contains a sample of this type of script - see CI_FUNCERR.

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.

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.

Note: Conditional step type. This step type is only applicable to BPA scripts.