Use Do(actionApiName, input) to execute an action by its actionApiName with a custom input. This is especially useful for executing nested action (from within another action) and to create records in a related object (for example, an opportunity for a given contact).

When an action is executed, a nested context key is created at the current level of the execution context, and its key is returned by Do(), so you can retrieve data stored in the action's context with GetC().

How to use

Use the function in any of the following ways:

Do(actionApiName, input)

Input

  • actionApiName (text): the API name of the action to be executed.

  • input: the record ID for which the action is being executed. The record's object must match the object selected in the properties of the actionApiName action.

Output

Context ID of the action that has been executed. You may use it as input for GetC(). Example of a Twig code that retrieves a myVar key from the context of a myActionApiName action executed for record ID record.id:
{{ GetC("myVar", Do("myActionApiName", record.id)) }}

Examples

Do("createCheckInRecord", record.id)

See also

Did this answer your question?