Using Variables in Global Actions and Action Groups

In spite of $Variables context object is not presented in objects lists on Global actions setup screen one can use it for complicated logic settings. 

Below is example of using variables within global action group. Form in the example is tied up to Account object.

First, create Global Action Group (How to create a Global Action Group). Then create Global Action within the action group (How to create Global Action):

  • Choose Context object (1), e.g., "Account"
  • Choose "Define Variable" Action Type (2)
  • Choose "Query" variable type in Define Variable Settings section (3)
  • Choose object to be queried, e.g., "Contact" (4)
  • Click "Add Field" button, select Email field and set variable name (5)
  • Add condition to query only contacts that have email value provided (6)
  • Switch to Advanced settings mode, choose ‘Account’ context object and choose ‘Account ID’ context object item (7)
  • Using Account ID value add condition to query only records that are tied up to the current account (8)
  • Set query Limit (9)

Save Global Action. Add second Global Action to the action group. 

  • Choose "Account" context object type (10)
  • Select "Email Alert" action type (11)
  • Switch to "Advanced" email alert settings mode (12)
  • Fill in "To" field with variable #1 value getting its value via {$Variables} context object: {$Variables.contact_emails} (13)
  • Provide email Subject and email text

Save global action.

Open the form you want to trigger Action Group at. Add custom button to the form.

  • Tie the button up to the Global Action Group (set Action Group as form action and add it as handler to the custom button "onClick" event)
  • Add {$Account.Id} as a source

Save the form.

  • Run the form (pass account that has contacts child records to the form as source record)
  • Click custom button - as a result of the global action execution related contacts will receive emails 

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.