How to Create Object-Specific Quick Actions in Salesforce

In Salesforce, we have a feature of Object-Specific Quick Actions that allows users to perform specific tasks related to a particular object without navigating through multiple screens, which results in saving time and enhances the user experience. This feature is available in both Lightning and Classic editions of Salesforce.

I will explain to you the method to Create Object-Specific Quick Actions in Salesforce Lightning and Salesforce Classic, respectively.

As a system admin, modifying the layouts is part of day-to-day tasks. Once I got a task to create a quick action for the Contact records because the Sales team wanted to access the Order billing for contact from the contact record page so that they don’t need to navigate to Orders separately.

Object-Specific Quick Actions in Salesforce

In Salesforce, Quick Actions are predefined tasks or processes that users can perform directly from a record page. By implementing this feature users do not need to navigate to different pages and sections.

Object-Specific Quick Actions are created for a specific object, such as leads, opportunities, accounts, contacts, or cases, and enhance user experience.

Types of Quick Actions in Salesforce

While creating a quick action, we have to select an action type, and below is an explanation of the various types of quick actions.

  • Create a record: This record type allows users to quickly create a new record for a specific object. Here, we have to select a target object for which the new record will be created.
  • Send Email: This action enables users to send emails directly from a record page of the object.
  • Log a Call: It is used to log calls for a record, such as call duration, comments, etc. For example, creating a log call communicating with a lead or the campaign members.
  • Custom Visualforce: This action allows you to create a custom Visualforce page to perform a specific action.
  • Update a record: Using this action type is a quick way to update fields on a record without navigating to the full edit page.
  • Lightning Component: This action type uses a custom Lightning component to perform a specific action.
  • Lightning Web Component: It is similar to the Lightning Component, but it is built using the newer Lightning Web Component (LWC) framework.
  • Flow: This action integrates with Salesforce Flow to automate complex processes.

Considerations for Quick Actions in Salesforce

There are the following considerations that we should be aware of while working with Quick Actions in Salesforce.

  • To see an object-specific action on a page layout, a user must have both Read and Edit permissions on the action’s relationship field.
  • If you select the record type as create a record then it will come with the target object. For example in the Account object, you define a create a record action with the target object Order then the user should have a view and edit access for both objects.
  • If you delete an action, the action is removed from all layouts where it is assigned.
  • Automatic triggers that change record ownership can affect the object details that are visible to users. For example, if we use a global create quick action to create an object and an automatic trigger changes the object ownership, some information about the object will not be visible to us.
  • When you create a custom quick action, use a unique label and API name instead of standard labels. If the custom quick action has the same API name as a legacy standard action, Metadata API and change set deployment errors can occur.
  • Actions to create records for an object that is the detail object in a master-detail relationship must be object-specific, not global.
See also  How to Make Lookup Relationship Field Required in Salesforce

Create Object-Specific Quick Actions in Salesforce Lightning

To create Object-Specific Quick Actions in Salesforce Lightning, navigate to the Setup page of Salesforce Lightning and follow the below steps.

1. On the setup page of Salesforce Lightning, click on the Object Manager tab.

Create Quick action for object in Salesforce

2. In the setup window of the object, go to the left sidebar and click on Button, Links, and Actions, and in the next window, click on the button New Action.

Create Object specific Quick action in Salesforce

3. In this step, go to the field Action Type and select the action type of the Quick Action. In this example, I have selected the action type as Create a record.

When you select the option Create a Record, then you have to select the Target object also, and I have selected the target object as Order.

After this, select the Relationship field for the target object.

Salesforce Lightning Object Specific Quick Action

4. From the dropdown field Standard Label Type, select the label for quick action, and if you want to add a custom label, then select None.

Then enter the name for the quick action in the Label field and enter its API name in the Name field.

Add label for Object Quick Action in Salesforce

5. After this, you can enter the optional fields Description and Success message, and at last, click on the Save button.

6. In this window, we can add additional fields to the quick action, and for that, select and drag the field to the region of quick action fields. Here, in this example, I have added the Order Name field.

After adding the field, click on the Save button.

Add field to the Quick Action in Salesforce Lightning

7. Now, we will add the created quick action in the page layout of the object and, for that, navigate to the Page layouts of the object.

See also  Create Custom Fields in Salesforce

At the top, click on Mobile & Lightning Actions and then drag the created quick action to the section Salesforce Mobile and Lightning Experience Actions.

After this, click on the Save button.

Add Quick Action to the page layout in Salesforce Lightning

Now, the quick action Order Billing is successfully added to the Contact object. To view the created quick action, navigate to the object record page, and there you will be able to view the created quick action as shown in the below picture.

Salesforce Object Specific Quick Action in Lightning

In this way, we can create an object-specific quick action in Salesforce Lightning by following the above examples.

Create Object-Specific Quick Actions in Salesforce Classic

In this example, I will explain to you the method to create object-specific quick actions in Salesforce Classic, and for that, switch to the Salesforce Classic edition, then follow the below steps.

1. On the home page of Salesforce Classic, click on the Setup tab on the upper right side of the window.

2. In the setup window, go to the Build section on the left sidebar bar and click on the Customize dropdown.

3. Select the object in the customize dropdown and then click on the option Buttons, Links, and Actions.

In this example, I have selected the object Campaign to create a quick action.

Create Object specific Quick action in Salesforce Classic

4. In the setup window of buttons, links, and action, click on the button New Action.

Create a New action for object in Salesforce Classic

5. Now, we will enter the information for the action, and for that, first go to the field Action Type and select an action from the dropdown list.

In this example, I have selected the action type as Log a Call, which means this action will create a log call.

Select action type for quick action in Salesforce

6. To enter a label for this quick action, you can select a label from the list of Standard Label Type, and if you want to create a custom label, then select the option None, then enter the name for the action in the Label field.

See also  How to Set Default Value for Number Field in Salesforce

The Name field will auto-filled according to the entered Label. This Name field will be the API name for the action.

Create Quick action for object in Salesforce Classic

7. After entering the label, enter the optional fields Description and Sucess Message. Click on the Save button.

Salesforce Classic Create a Object specific action

8. In this window, we can see the layout of the quick action, and here, we can add task fields to the layout for that selection, then drag and drop the field to the region of the action layout.

After this, click on the Save button.

Add field to the Quick Action layout in Salesforce Classic

9. Now, to make this quick action visible on the page layout of the object, navigate to the object page layout setup and click on click on the Edit button of the page layout.

Add Quick Action to the page layout in Salesforce Classic

10. At the top of the window, select the option Quick Action from the scroll bar and then drag the created quick action to the section Quick Actions in the Salesforce Classic Publisher.

Add Quick Action to the object page layout in Salesforce

As we click on the Save button, the Quick Action will be added to the page layout of the object, and we can view it from the object record page.

Salesforce Classic Object specific quick action

Now, we can see in the above image that we have successfully added the Quick action to the object in Salesforce Classic.

In this way, you can add object-specific quick actions in Salesforce Classic, and you can follow the above steps to add quick actions in other objects, too.

Conclusion

Object-Specific Quick Actions in Salesforce is a valuable tool for organizations to optimize their workflow and enhance user efficiency. By following the above examples, we have gone through the whole procedure to create and view object-specific quick actions in Salesforce Lightning and Salesforce Classic.

Along with this, we also learned about the other action types available to create a quick action in Salesforce, and later, we discussed the considerations that we should be aware of while using object-specific quick actions in Salesforce.

You may like to read: