NextGen Knowledge Center

Set up Trigger Script Trigger

The Trigger Scripts enables you to create, maintain, and invoke reusable structured code blocks. These structure code blocks can perform all the operations of existing trigger actions.

The Template Runtime provides the ability to debug trigger scripts and set break points in trigger scripts, code execution, and examine values.

A debug attribute can be set for any Trigger Script trigger. When a trigger with the debug attribute is executed in runtime, the Trigger Script Debugger window displays and execution is paused at the related trigger scripts and then goes through the code execution, examining values, and evaluating code segments.

  1. Follow the applicable steps in General Trigger Setup.
  2. Select the Trigger Script action.
    The Trigger Script window opens.

  3. In the Function Script Name list, select the required structured code block or script name.
    The Comments box displays the related comments and the Parameters grid displays the respective parameters.
  4. In the Output field, select any variable or field defined for the existing template to receive the function’s return value.
    • The Comments box is read only and displays the related comments of the structured code block or the function script name.
    • The Parameters grid displays name of the each scripts parameters and allows you to specify a text value or to select any variable or field defined for the template to pass as the parameter’s value at runtime.
  5. Select the Debug Mode check box to signify the debugger when this trigger script is invoked in runtime.
  6. To copy the script to the clipboard, select Script It, and then select Copy to Clipboard.
  7. To close the window, select OK.
  8. If necessary, set up a specific condition for the Trigger Script action to be triggered.
  9. Select OK and save your template.
    The trigger is listed in the Triggers window.