How to Execute Global Action Group From the Work-Relay Process
Add Call Apex Action to process step (1):
Select GlobalActionService
(2) in "API Class Name" picklist, and select ExecuteActionGroup
method (3):
Set groupId
parameter value to Global Action Group Id (4):
To get the Global Action Group Id go to the Actions -> Action Groups, open the Action group you need and copy ID (5):
(Optional) populate "Source" parameter (6).
In the Source you can pass a JSON Array which contains sources for each action from your Action Group. There are 2 ways you can pass sources:
-
Option 1: Pass Action ids with record Id for each action:
"{Action1_ID}":"{record1_Id}", "{Action2_ID}":"{record2_Id}",...
-
Option 2: Pass Object Name and Record Id. All Actions which use specified object as a source will use specified record Id:
"{Object1_API_Name}":"record1_Id", "{Object2_API_Name}":"record2_Id",...
For example if there are 4 actions in the group, 3 of them use Account as Source object, and 1 uses Contact, and you pass: "Account":"{Account.Id}", "Contact":"{Contact.Id}"
, 3 actions will get the Account.Id as a source, and 1 will get Contact.Id.
(Optional) populate variables (7):
0 Comments
Add your comment