After completing this unit, you’ll be able to:
You know the saying that you should judge someone only by their actions? That’s true in Salesforce, and your users will judge you favorably when you give them access to awesome customized actions.
Actions let your users quickly do tasks, such as create records, log calls, send emails, and more. With custom actions, you can make your users’ navigation and workflow as smooth as possible by giving them quick access to information that’s most important.
In previous units, we glossed over the actions sections of the object page layout. This unit is where we explore those areas of the page layout and give you a taste of how actions can enhance your users’ Salesforce experience.
Quick actions come in two different flavors.
Object-specific Actions
Object-specific actions have automatic relationships to other records and let users quickly create or update records, log calls, send emails, and more, in the context of a particular object. For example, you add an object-specific action on the Account object that creates contacts. If a user creates a contact with that action on the detail page for the Acme account, that new contact is associated with Acme. Object-specific actions live on the page layout for the object.
There are several types of object-specific actions.
Global Actions
You create global actions in a different place in Setup than you create object-specific actions. They’re called global actions because they can be put anywhere actions are supported. Use global actions to let users log call details, create records, or send email, all without leaving the page they’re on.
Global actions live on a special layout of their own, known as the global publisher layout. It isn’t associated with an object, and it populates the global actions menu in Lightning Experience. Users can access the global actions menu by clicking in the Salesforce header.
If an object page layout isn’t customized with actions, then the actions on those object record pages are inherited from the global publisher layout.
There are more types of actions than just these two, but some of them aren’t customizable. We’re going to explore only object-specific and global actions in this unit.
Maria wants to give her users an easy way to create energy audit records. She’s going to create an object-specific action that lets her users create energy audits right from account records. Because it’s an object-specific action, the new audit records will be directly tied to the accounts they’re created from.
There are already some actions in the highlights panel on energy audit records. Those are default actions, inherited from the default global publisher layout. Maria’s going to create her new object-specific action, add it to the Account page layout, and then customize the actions that users see on account records.
After you create the action, you can customize its layout using the action layout editor. It’s like the page layout editor but for actions. With the action layout editor, you can customize the fields the users must populate to complete the action.
Just like the page layout editor, the upper part of the action layout editor contains a palette, and below it is the action layout. The palette contains fields from the action’s target object that you can add to the action layout.
Each field on this action layout has a red asterisk, indicating that it’s a required field. Required fields are added to an action layout by default when you create the action. If you remove a required field from an action layout, then users can’t successfully complete the action. In this case, that means that users wouldn’t be able to create the energy audit record.
Audit Notes and Type of Installation are fields that could be populated after the audit record is created. So let’s leave this as-is and move on to the next step: making the action available to users.
To make the New Energy Audit action available to users from an account record, Maria must add the action to the Account page layout.
Screen reader users, adding actions to a page using the Page Layout Editor is not available in the Salesforce Classic interface. Drag-and-drop functions using a screen reader will not work for the Lightning Experience interface for Page Layout Editor because focus lands above where the mouse would need to be precisely positioned. This causes the drag-and-drop to fail.
The process to add actions to a page layout is accessible with a screen reader through the Lightning App Builder by upgrading the page to use dynamic actions. You can learn how to
Create Dynamic Actions in Lightning App Builder
but this Trailhead unit does not cover the Lightning App Builder. There is a quiz at the end of this unit, so you will not need to complete a challenge to get credit for this exercise.
Read along with the instructions from the original Trailhead unit below which describe the process using the Page Layout Editor. These instructions are using Lightning Experience with the Enhanced Page Layout Editor enabled in the User Interface settings.
Excellent! Now Maria’s users can easily create an energy audit record that’s automatically associated with an account. Her users will see the new action on the page-level action menu. Let’s take a look.
The actions in the action menu are shown in the order that they’re listed on the page layout. For example, this page layout with the New Energy Audit action …Looks like this on the account record …
Note
Although they’re actions, Email, Log a Call, New Event, and New Task don’t show up here. Because they’re associated with activities, they appear under the Activity Publisher heading when the Activity tab is selected. Standard Chatter actions like Post and Poll show up under the Chatter tab.
The Sales team has asked Maria to create an action that lets users create a campaign no matter where they are in Salesforce. A global action is an ideal way to do this, because the global actions menu appears at the top of every page.
Creating a global action looks a lot like creating an object-specific action except you start on a different page in Setup.
Screen reader users, be sure your Salesforce is using the Lightning Experience interface, and join in as we create a new global action.
As we mentioned earlier in the unit, global actions live on a special layout of their own, known as the global publisher layout. The global publisher layout populates the global actions menu.
Adding an action to the global actions menu is a lot like adding an action to a record page. You simply drag an action from the palette onto the global publisher layout.
This area poses the same accessibility challenge as adding quick actions to an object-specific layout, so screen reader users, feel free to read along with the steps outlined below.
There’s the New Campaign action. Nice work! Now anyone at Ursa Major Solar can create a new campaign from anywhere in Salesforce.
Click to return to the unit on Trailhead to proceed with the quiz at the end of the reading.