Using Sublist Action Groups in NetSuite Workflows

You can execute actions on sublist lines as part of workflows for transaction records with Sublist Action Groups. A Sublist Action Group is a group of actions assigned to a workflow state that is to be executed on each line of a sublist. Whether the actions execute during a workflow state is contingent on the group’s and group actions’ conditions. The sublist action group’s condition determine if the group executes. For the group to execute, the group’s condition must evaluate to true. If the group’s condition evaluates to true, the workflow iterates over all sublist lines and attempts to execute each of the actions within the group. If a group action’s condition evaluates to true for a sublist line, the action executes on the sublist line. All actions are evaluated for the possibility of execution on a sublist line before the group moves to the next sublist line. After an action is evaluated, the result of the action is immediately taken into account for the evaluation of subsequent group actions. For example, consider a sublist line’s Description field that has a value of Val1. A sublist action group has the two following Set Field Value actions:

  • Set Field Value action 1 sets the sublist line’s Description field value to Val2.
  • Set Field Value action 2 has a condition that will execute the action if the sublist line’s Description field’s value is Val2.

Both Set Field Value actions are executed. The first action has no condition and changes the value of the sublist line’s Description field to Val2. When the second action is evaluated, it sees the value set by the first action and knows to execute next.

You can include the following action types in Sublist Action Groups:

  • Set Field Value. This action lets you set the values for record body fields, custom workflow state fields, and sublist fields. You can also set values for these fields depending on the values of the same types of fields (record body, workflow state, sublist).
  • Create Record. This action lets you create a new record, depending on the values of record body fields, custom workflow state fields, and sublist fields. For example, when a training item is ordered on a sales order record, you can create a task record for the training supplies for that order.
  • Send Email. This action lets you send an email for each item line. You can use all of the line fields, body fields, workflow and state custom fields in the subject and body of the email. To access the currently processing line from within an email template, use the prefix currentLine.
  • Return User Error. This action returns a user error for the record. You can use all of the line fields, body fields, workflow and state custom fields in the subject and body of the email. Because the action is executed on the server, the error is returned as a full-page message.

Sublist Action Groups can be executed on all server triggers. They cannot be executed on client triggers.

Sublist Action Groups are available for all workflow definitions created on transaction records. Sublist Action Groups cannot be used on opportunity records. To configure a sublist action group, you first create the group, then you add actions to the group.

To create a sublist action group:

  • If you have not already done so, open the existing workflow that contains the state where you want to create an action group in edit mode.
  • In the diagrammer, select the state and click the Edit icon on the State tab in the context panel.
  • Click New Sublist Group. The Sublist Action Group window appears with the Type field set to Sublist Action Group.
  • In the Workflow Action Group window, enter the following properties for the action group:

  • To make the group inactive, enable the Inactive property. The next time the workflow executes, the actions in the group do not execute. Inactive sublist action groups are dimmed in the context panel.
  • To enter a condition for the action group, use the Condition Builder or Formula Builder.
  • The condition criteria must be met for the actions in the group to execute. Use a condition to limit the situations in which all actions in a group execute, for example, only for a specific user.
  • Be aware that sublist action group’s condition can include only record body fields. The actions within the sublist action group can contain both recordy body and sublist fields.
  • Optionally, select a saved search as a condition for action group execution. The actions in the group execute if the current record in the workflow is returned from the saved search.
  • To appear in the dropdown list, the saved search record type must be the same as the base record type for the workflow.
  • In the Parameters section of the Sublist Action Group window, the Items sublist is selected in the Sublist dropdown list.
  • Optionally, enter a schedule. The actions in the group execute on the schedule you enter after the record enters the state in the workflow.
  • Click Save. The new group appears in the list of actions for the state on the Actions subtab. You can also view sublist action groups on the State tab in the context panel.

To add actions to a sublist action group:

  • In the context panel’s State tab, point to a sublist action group’s name. When you point to a sublist action group, icons appear that let you add actions to the group, edit the group, or delete the group from the state.
  • Click the + icon.
  • On the New Action window, click the type of action you want to add to the group. You can select from the following actions:

–Create Record Action

–Return User Error Action

–Send Email Action

— Set Field Value Action

  • Configure the selected action.
  • Repeat steps 1 through 4 to add more actions to the group.

Leave a comment

Your email address will not be published. Required fields are marked *