rbv_api.runTrigger()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This Object Script method runs a trigger on the specified object. This method will invoke a trigger regardless of timing options, such as On After Update. For HTTP calls, consider using sendHttpGet() or setHttpPost() instead.

Formulas used in Object Script triggers can include other API methods and regular Platform template functionality, such as loops. Object Script methods have no effect if called outside of update triggers.

Syntax

rbv_api.runTrigger(objName, Id, triggerOrigId, checkValidation, runRecursions, runAsync)

Mandatory Parameters

objName

Integration name of the object

Id

ID of the record on which to run the trigger

triggerOrigId

Integration name (string) or original ID (string) of the trigger

Optional Parameters

checkValidation

Can be true or false. If set to true, check validation formula before running trigger, otherwise ignore validation formula. The default value is false.

runRecursions

Can be true or false. When runRecursions is set to true, configures the trigger to run recursively, assuming recursive properties are set on the trigger definition page. The default value is false.

runAsync

If true, forces the trigger to run with a 5-second delay regardless of whether or not delay timing options, such as Run Relative To, Run At, etc. are set for the trigger. This is an optional parameter and its default value is false.

Return value

None

Permissions required

Edit permission for the selected object type. 

Examples

Example 1:

All the optional parameters have a default value, hence need not be specified. Only the mandatory parameters are specified.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA")

Example 2:

checkValidation is True (non-default value), while the other optional parameters have default values.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", true)

Example 3:

runRecursions is True, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, true)

Example 4:

runAsync is True, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, false, true)