function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shubham4462Shubham4462 

Related list button in salesforce lightning

Hello All,

I have a related list button in salesforce classic which showing a popup during creation of record.

I want same fuctionality in salesforce lightning but somehow the JS buttons are not working , i have a workaroud but i think that workaroud is not good so can you guyz please guide me.
Dushyant SonwarDushyant Sonwar
Custom JS buttons will not work in lightning experience . You need to create a lightning component and override with standard button or a create a quick action 
Below is a short example of how to do it
https://trailhead.salesforce.com/en/content/learn/projects/workshop-override-standard-action/override_4

How to create Quick Action
https://help.salesforce.com/articleView?id=lightning_component_actions_create.htm&type=5

Hope this helps.
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

Custom actions in the standard related list in LEX is not possible yet. There's an idea which is active on the success community with a similar discussion for which you can upvote so that it gets available in the future.

https://success.salesforce.com/ideaView?id=0873A0000003TXFQA2

However, you can use quick action or write a custom component to use it in quick action.

Component:
<aura:component implements="force:LightningQuickAction,force:hasRecordId">
    Parent record is {!v.recordId}
</aura:component>

Set that up as a Lightning Component type of action on the parent object and it will receive the recordId of the parent record when pressed.

You can not override related list standard button as of now.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas