Using Sublist Action Groups
You can run actions on sublist lines as part of a transaction record workflow using Sublist Action Groups. A Sublist Action Group is a group of actions assigned to a workflow state that run on each line of a sublist. Whether actions run during a workflow state depend on the group and group action conditions. The sublist action group runs only if its conditions are met. For the group to process, the group’s condition must evaluate to true.
If the group’s condition is true, the workflow goes through all sublist lines and tries each in the group. If a group action’s condition is true for a sublist line, the action runs on that line. All actions are checked for a sublist line before moving to the next line. After an action is evaluated, the result is immediately considered for the next 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 it runs if the sublist line’s Description field’s value is Val2.
Both Set Field Value actions run. The first action doesn't have a condition and changes the Description field to Val2. When the second action is checked, it sees the new value and runs next.
You can include the following action types in Sublist Action Groups:
-
Set Field Value. This action lets you set values for record body, custom workflow state, and sublist fields. You can also set values for these fields based on values of the same field types (record body, workflow state, sublist).
-
Create Record. This action lets you create a new record based on record body, custom workflow state, or sublist field values. For example, when a training item is ordered on a sales order record, you can create a task record for the training supplies.
-
Send Email. This action lets you send an email message for each item line. You can use line fields, body fields, workflow and state custom fields in the subject and body of the email message. To access the currently in an email template, use the prefix currentLine.
-
Return User Error. This action returns a user error for the record. You can use line fields, body fields, workflow and state custom fields in the subject and body of the message. Because the action runs on the server, the error appears as a full-page message.
You can use Sublist Action Groups on all server triggers, but not on client triggers. For information about workflow triggers, see Triggers Reference.
There are some things to keep in mind about executing sublist action groups and the actions within them on the Before Load Trigger. For details, see Executing Sublist Action Groups on the Before Load Trigger.
You can use Sublist Action Groups with any workflow definitions created on transaction records, but not on opportunity records. To configure a sublist action group, first create the group, add actions to it, and configure these actions. For more information, see Creating a Sublist Action Group, Adding Actions to Sublist Action Groups and Configuring Actions for Sublist Action Groups.