Define a Macro based on an existing action, to execute recurring tasks without the need to configure a new action each time.
Do you find yourself configuring the same action again and again, or do you want several users to execute identically configured actions? Set up a Macro: a predefined action that can be reused. Select an action type, define which fields and values should be used, and save it for future use.
Once a Macro is created, it is listed in the Action Library between the other actions. Macros are easy to distinguish from standard actions by the Macro tag.
A Macro can be used in a Job, from a List View via the Action Launcher, and in Salesforce Flows. The Macro configuration cannot be edited when the Macro is called by a user, only in the Action Library.
Restricting Action access with a Macro
As with other actions, the availability of macros is determined via profile assignment. Profile assignment for a macro is independent of the profile assignment of the standard action that the macro is based on. This means that you can deny a user access to a standard action with all its configuration options, but allow access to a macro based on that action, to allow restricted access to the action features.
For example, create a macro based on the Mass Update action, with only two fields configured to update with predefined values. This way, a user can only bulk update specific fields with specific values, not all object fields with any value.
Creating a Macro
Create a Macro as follows:
- Go to DAP Setup > Action Library.
- At top right, click New Macro.
- Select an action to base the macro on. Click Next.
- Configure the macro.
- Enter a label that clearly describes what the macro does, as the macro will be listed in between all other actions.
- Select an icon for the macro, to distinguish it from other actions and to help make clear what the macro is for.
- For some action types you also define here for which object the macro is intended.
- Click Next.
- Configure the action. Select the fields and values that will be filled when the macro is executed. In a Mass Update macro, leaving Update With Value empty will clear the field in question.
See the knowledge articles for the different actions for more information on how to configure the actions.
Click Next. - Review the summary and click Create.
The macro is created and added to the Action Library. - Click Assignment to assign one or more profiles or users, to make the macro visible in the Action Launcher, and to indicate whether the macro should be available for Jobs, Scheduled Jobs, List View, Action Grid, DC Job Results (if you have Duplicate Check installed), Start an Action from an Apex Class, and/or Start an Action in a Flow.
Click Save.
Direct Action, Scheduled Job, or Macro?
Direct Actions, Scheduled Jobs and Macros are all used to execute a predefined action multiple times.
- Use a Direct Action to apply an action to one or more records whenever they are created, updated or (un)deleted, without any user interference
- Use a Scheduled Job to run an action on a static or dynamic selection of records repeatedly without any user interference, following a set schedule.
- Use a Macro to run an identical action whenever you want to run it; to let several users run the same action with the exact same configuration; or to let users with limited rights perform one specific action without giving them access to the full action.