List view action in salesforce lightning 1
In this post, we see how to add custom actions to the list view in the Salesforce lightning framework. 

Create a button from the setup

Login to Salesforce

Click the Gear icon and navigate to setup

Go to Object Manager

As part of this article, we are adding a new button to the list view of the case object.

Search for Case object and drill down on it, expect the below-mentioned screen
List view action in salesforce lightning 2

Find submenu and click on Buttons, Links, and Actions and click the New Action button
List view actions in lightning experience 3

Add the details as mentioned below
Create quick action button salesforce
We have selected Work Order as a Target Object 

Click Save button

Add required fields to the layout and click the Save button.

Action layout editor salesforce


Add button to the layout

In the same screen, go to submenu > click on the
Search Layouts for Salesforce Classic > Click Edit option for List view

Search layouts for salesforce classic


Add newly created button to the Selected Quick Actions column and Click Save button

Add action to search layouts salesforce

Please note search layouts are split between the Search layouts and Search layouts for Salesforce classic. Add your Action to the Search layouts for Salesforce classic.

Well, we are done with the configurations. Verify the same in the layout.

Result

List view action button salesforce

When you click the newly created button, it says to select at least one record, because Work order is a child entity for the Case and hence we must always select the parent record before creating a new record from the Create a Record Action button in the list views. 

Have a look at the Quick Action Considerations to understand more. 

In case you are looking for something different, mention it in the comments section. Our team is glad to support your Salesforce implementations and troubleshooting.

Last updated on: 20 Mar 2022