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

Need to add custom button in lightning related list record (drop down along with edit and delete)

Is it possible to add new action/button along with edit/delete values in drop down in salesforce lightning in the related list record.
In Opportunity record(in lightning) i have a related list. In the related list record we drop down actions edit and delete. I would like to add a custom action/button which will make a call to lightning component or vf page.

User-added image

Raj VakatiRaj Vakati
  • Go to Object Manager Tab available on Setup in Lightning Experience.
  • Create a Custom Button on child record there in the related list.
  • User-added image
  • Choose display type as List Button
User-added image
  • Go to the Page Layout of Parent Object in Object Manager
  • In a related list section, click on Related list Properties icon on the desire related object.
  • User-added image
  • Add the button over here and save the layout.
  • Here you go, Check on Parent page layout:
  • User-added image
Hi Raj,

I want the button to appear in the drop down as i have shown in the image and not outside at the header level. Is it possible ?

Kumar SaxenaKumar Saxena
Hi Amrut,

Were you able to sort this out? I have a similar need and any help will be greatly appreciated!
Hi kumar, No, seems it's not possible. Went with some other approach.
Hi Amrut. CAn you please let me know alternative approach you took. I have similar requirement i want to add Open configration on quot eline item which is related list of Quote.

Please sugest.
Christina Wildau 13Christina Wildau 13
Amrut, can you please share you alternative approach? I need the exact same functionality you are describing here.


Christina Wildau
Sarana Sabbi 7Sarana Sabbi 7
Hi Amrut, 

Could you please share the workaround for this requirement? We have the same requirement.
Oded Ben-DoriOded Ben-Dori
Once the custom list item is already created, do the following:
  1. Setup - Object Manager - Custom Child Object
  2. Fileds & Relationships - choose 'Category' [make sure Data Type = Pick List].
  3. Under 'Values', click 'New' - add your item to the list. 
Now you should be able to pick the item from a dropdown list. 

User-added image

I would recommend using a formula field and a flow to achieve. Sadly it cannot be put in the drop-down, but should be good enough as a solution.
Check out this blog for the solution walkthrough!

vinai tvinai t
Thanks for the insight, greatly appreciated
Cameron YaleCameron Yale
Is it possible to add a List Button to a related list that launches a screen flow?
Ken SKen S
@Cameron Yale, I have found this "solution" (" onclick=", '', 'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no'); return false;) whose Salesforce narrator makes this sound so incredibly "easy" and intuitive with about 20 different steps just to add a button to a page, you kind of want to slap him in the face -- requires using a combination of creating a new custom Button in Setup on the related list object (you can manually paste in the /flow/flow_api_path_name as shown in the example), then manually adding the new button which is hidden in the Classic Page Layout editor of the parent object by clicking the wrench on the related list, then scrolling to the very bottom of the tiny Button section, then also adding as a new Action in the Lightning Page Builder under Actions - Custom - [new button name] (although I found the button showed up as an option on the Lightning page anyway under Actions without doing this). So obvious and intuitive, right?

The only problem I'm still having is that in creating the button at the first step, you seem to only be able to select the "List Button View example" bullet (these 3 meaningless and confusing AF choices with with their antiquated 2002 Classic "help" screenshots are a joke):

Detail Page Link View example
Detail Page Button View example
List Button View example**

But if you select that one, the only option is to launch the flow inside the same window instead of a modal / popup!  If you try either other option, then you can't get the button to appear in the Related List at all (it disappears from the Classic Page Layout editor and Lightning App builder).

Such ridiculous design with legacy code all twisted around in a mess of a configuration... I'm sure there's some other way to make the flow launch in a window, maybe using Javascript...or dear Salesforce, maybe we should all just go back to using Visualforce or Classic, so we can make sense of these lovely screenshots you have in the help dialogs from Salesforce 1.0?  (Hmm, perhaps Salesforce will update this dialog around the time they add an "Edit" button to this forum so I don't have to completely delete, recreate & reformat the post each time I try to fix a typo.)