If your users share the same page layout across multiple profiles, you may have actions that only pertain to certain users or only are relevant under certain circumstances. If a user who shouldn’t have access clicks on that action, they may get an insufficient access error. By showing actions that is not relevant to the record at the moment, you are just adding clutter to the page. Neither provides good user experience. Why show me that action at all?
Rather than show all actions all the time and to all users, build your actions with user experience in mind. Dynamically show actions to your users using action visibility in Lightning Experience.
Important things to note about dynamic actions:
- Dynamic actions for custom objects are GA for desktop and Beta for mobile.
- Dynamic actions for standard objects are Beta for desktop.
Business Use Case: Addison Dogster is the system administrator at Sprinkles, a company that sells cupcakes on the go. Devohne Mays, Head of Sales Operations, is struggling with his staff not knowing when to use which actions. His staff is frustrated with seeing actions that do not apply to them. What awesome admin powers can Addison use to dissolve these issues?
Solution: Addison uses the feature called Dynamic Actions to show actions that are relevant to the user at the right time. Win, win for everyone!
Highlighted Steps:
1. Navigate to the record detail page and click the wrench icon and selecting Edit Page to open the Lightning record page in Lightning App Builder.
2. Click on the Highlight component to view the Highlights Panel attribute. Click Upgrade Now to upgrade to Dynamic Actions.
3. Next, select whether to Migrate or Start from Scratch with the action configuration. If you select Migrate, then select the page layout to migrate the actions from. If you select Start from Scratch, you select to add each action to the record page.
4. Next, you configure the action visibility to conditionally display the action based on record, device or advanced. Click the action, click Add Filter, set the action visibility. Click Done when you’re done.
You can set to show the action based on attributes of the record (as we did here), based on the form factor of the device (desktop and/or phone) or advanced attributes (device, user, permissions or record). If you have multiple conditions, you can set it to show the action component when all filters are true, any filters are true or the filter logic is met.
5. Rinse and repeat step 4 for each action you wish to set action visibility for. Once done, click Save and click the back arrow to return to the page and test out your work!