3

I have a requirement where I want to have a custom list view button with an ability to perform a mass custom action in the Lightning environment.

I do not see an option to add lightning quick-action on the list view.

Is there any way to have a custom list view button on a custom object?

6

You can create a Visualforce page using the standard list controller, and define it as a list button.

Refer this link: Adding Custom List Buttons using Standard List Controllers

These display as expected in Lightning:

You can create new actions for your objects, in the form of buttons and links, by defining them on an object. JavaScript buttons and links aren’t supported in Lightning Experience, but Visualforce (and URL) items are. The process of defining Visualforce buttons and links is identical to that in Salesforce Classic, so we won’t bother to show it here.

Don't forget the Custom Object must be Searchable in order to add your new button to the List View Search Layout.

You can then use Lightning for Visualforce (Lightning Out) to render a lightning component in your VF page if you're doing a primarily lightning component project.

Trailhead Module: Use Visualforce in Lightning Experience

5

This might be helpful - https://developer.salesforce.com/blogs/developer-relations/2016/09/take-the-first-steps-ways-you-can-replace-javascript-buttons.html

You can create a Lightning component to perform the mass actions and load that component in the visualforce page using Lightning out and then you can add that visualforce page on custom list view button as shown in above blog.

As per Lightning experience roadmap - https://help.salesforce.com/articleView?id=lex_roadmap.htm&type=0&language=en_US&release=204.15 The “Lightning Mass Actions: Act on multiple records from a list view using a Lightning action” feature will be coming in near future release so design above component in such way that it will be reused once this feature gets available.

I hope this will be helpful.

Best Regards, Nilesh Dethe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.