Custom Action

Use the Custom action to define an action with a SuiteScript Workflow Action script. The SuiteScript script will define the Custom action's behavior. Therefore, to use a Custom action in a workflow, first you will need to develop and deploy a SuiteScript Workflow Action script.

For information about SuiteFlow Workflow Action scripts and to see sample code, see SuiteScript 2.x Workflow Action Script Type.

To create a custom action

  1. Create and deploy a Workflow Action script to define the action's functionality.

  2. In the Workflow Manager, create a new action. The custom action only appears if the Workflow Action script was deployed for the base record type of the workflow. Workflow Action scripts display in the New Action's Type section with the (Custom) identifier:

    Image of the New Action window for a Workflow Action script called Workflow Line Item.
Note:

Workflow definitions require a trigger configuration that initiates the workflow, executes an action within a workflow or transitions the workflow from one state to another.

Custom Action Parameters

The following table describes the Custom action parameters:

Parameter

Description

Store Result In

A workflow or state field where you can store the Workflow Action script return value.

To use this option you must first create the workflow or state field. See Workflow Custom Fields

Field

Parameter fields that are defined in the Workflow Action script deployment record. Here you can assign values to these fields so you can access them in the Workflow Action script using the SuiteScript N/runtime module. For more information, see N/runtime Module.

Note:

For more information about adding actions to a workflow, including common action properties and conditions, see Action Conditions and Creating an Action.

Custom Action Guidelines

Use the following guidelines when working with Custom actions:

Related Topics

Workflow Actions Overview
Creating an Action
Workflow Actions
SuiteScript 2.x Workflow Action Script Type
Storing a Return Value from a Custom Action Script in a Workflow Field

General Notices