Table of Contents
What if there’s a way for Users to complete tasks from the page they’re on right now without navigating to a particular location in the org? With Quick Actions, Users can get a lot done with just a click → From logging a call to creating a record, the possibilities are endless. Let’s learn how to manipulate Quick Actions to help our Users get their work done in the blink of an eye.
What are Quick Actions?
Quick Actions make everything easier! This versatile function can help Users complete tasks such as logging a call, creating a record, and launching Flows, Lightning Components, and Visualforce Components from easily accessible locations in the org. Quick Actions can be created using a point-and-click tool with no code, so it makes things easier for us Admins too.
Types of Quick Actions
Quick Actions come in two flavors:
These are actions that perform a specific function based on a specific object. They can be found on the object record page. For example, If you want to create a new Contact object directly from an Account details page, we can do that, and the Contact object is automatically associated with the Account object without the User needing to specify it.
These are actions that aren’t associated with any particular Object. They can reside anywhere in the org where actions are supported.
Use Case for Object-Specific Actions
We want the brokers at DreamHouse to be able to create quick notes when meeting a contact, it could be something the contact said that could help them find the perfect home for the contact and close the deal. To do so, let’s create an Object-specific action in the contact record page so that it’s convenient for our brokers to create notes and instantly associate them with the contact and later on find any notes associated with the contact without difficulty.
How to Create an Object-Specific Action?
1. From Setup, open Object Manager.
2. Open the Contact Object.
3. Select Buttons, Links, and Actions from the sidebar.
4. Click New Action.
5. Enter the following info:
- Action Type: Create a Record
- Target Object: Note
- Label: Create a Note
6. Click Save.
How to Customize the Action Layout?
After we create the action, we can change its layout using the action layout editor. It’s like the Page Layout editor but for actions.
1. To add a new field to the layout, simply drag and drop the field from the palette onto the action layout. For this action, let’s leave the layout as it is.
2. Click Save.
How to Set Predefined Values?
If you’re not already on the page for the Contact Action – Create a Note. Let’s do that first, and if you’re already on the page, skip steps 1 to 4.
Let’s pre-define the value for the field – Title
1. From Setup, select Object Manager and open the Contact object.
2. Select Buttons, Links, and Actions from the sidebar.
3. Click on the arrow ( ) next to the Create a Note action and click Edit.
4. Leave the next page as is and click Save.
5. Click New in the Predefined Field Values related list.
6. Enter the following:
- Field Name: Title
- Formula Value (Don’t forget the double quotes): “Quick Note.”
7. Click Save.
Let’s pre-define the value for the field – Private
Let’s pre-define the value for the field, Private, which is a checkbox. I want the checkbox to be selected by default to make the action as efficient as possible.
1. Click New in the Predefined Field Values related list.
2. Enter the following:
- Field Name: Private
- Formula Value: true
3. Click Save.
How to Add an Action to the Object-Specific Publisher Layout?
So far, we’ve created an Object-specific action for the Contact Object, but it’s not available to the Users just yet. To make the action visible to the Users, we need to add it to the Page Layout of the Contact object.
1. From Setup, click Object Manager and open the Contact object from the list.
2. Select Page Layouts from the sidebar.
3. Open Contact Layout.
4. Drag and drop the Create a Note action from Mobile & Lightning Actions in the palette onto Salesforce Mobile and Lightning Actions in the page layout.
5. Click Save.
How to Test the Object-Specific Action in the Salesforce Mobile App?
Let’s see how the Quick Action, Create a Note works in the mobile version of Salesforce.
1. Open the Salesforce app on your mobile device.
2. Open Contacts from the navigation menu and open any Contact object record.
3. Pull down the screen to refresh it so that changes may reflect on the app if it hasn’t already.
4. The Create a Note action should be on the Action Bar at the top of the screen.
5. Click on Create a Note to create a Quick Note, the Title is already filled with the predefined value we defined, and the checkbox for Private is already checked, which is due to the second predefined value we set.
Quite simple, wasn’t it? Any note you created can be found in the Notes & Attachments related list on the object record page.