custom button not showing in lightning - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Denise CrosbyDenise Crosby 

custom button not showing in lightning

Hello. I have a custom url button that executes a flow to clone an opportunity by passing in the opportunity ID as a URL parameter. It works great in Salesforce classic. The button does not display at all in Lightning.

I read a few articles that Lightning does not support buttons that pass url parameters, but wanted to make sure I wasn't overlooking something. What's another way to execute a flow from an opportunity page in Lightning?
Best Answer chosen by Denise Crosby
Denise CrosbyDenise Crosby
I think the problem was I had too many custom buttons. Once I removed a few, it let me add the one I needed to add. Very strange

All Answers

Suraj PillaiSuraj Pillai
Your custom button should show up in lightning, in the row of buttons in the top right. Please see screenshot below. And as far as prepopulating using url parameters go, I have found it to work well with flows.

User-added image

Neelesh Ratn DwivediNeelesh Ratn Dwivedi
Your assumption is wrong. javascript is not supported in custom butons, but you can call flows through custom button by passing parameters and also custom buttons are visible in Lightning.
You could see the buttons at the very end. Here is a custom button named create records automatically which is calling flow in my case and is available.
User-added image
Denise CrosbyDenise Crosby
Why would the button only show in Classic Salesforce?

Here is the button "Super Clone" defined on the page layout:
User-added image

Here it shows up in Salesforce Classic:
User-added image

But not in Lightning:
User-added image
Suraj PillaiSuraj Pillai
Can you please  post a screen shot of the button definition? 
Denise CrosbyDenise Crosby
Hi Suraj,
Here is the button definition. Thanks for helping
User-added image
Suraj PillaiSuraj Pillai
I think the issue is that you have used a relative URL, instead of the full URL. Try using the full URL starting from "https".

If that doesn't work, try these steps :
A) Create a new custom URL button, and see if that shows up 
B) If that doesn't work, as an alternative, try using a Hyperlink formula field on the Opportunity detail page. That will show up, for sure 
Denise CrosbyDenise Crosby
Thank you Suraj. Do I have to have My Domain setup?
Denise CrosbyDenise Crosby
I was able to get this to work as a link instead of a button, but would rather have it as a button. What url should I use?
Suraj PillaiSuraj Pillai
No, you shouldn't need to set up a domain, just for this. However, it is recommended to setup one for LEX. Anyhow, I was able to make it work, with a relative url, without a "My domain" set up. Not sure what's going on with your instance. Sorry. Use the full url of the flow. You can copy it from the address bar when you run the flow 

User-added image
Did you try creating a new button, similar to this one, and seeing if that shows up? 
Denise CrosbyDenise Crosby
Hi Suraj,
Thanks for the information. I tried using the full url of the flow, but that didn't work. I also tried creating a new button and that didn't work either. It only works as a link.
The next thing I will try is to create a similar button for a different object and see if it shows up.
Denise CrosbyDenise Crosby
I think the problem was I had too many custom buttons. Once I removed a few, it let me add the one I needed to add. Very strange
This was selected as the best answer
Cliodhna EganCliodhna Egan
I have also created a custom button to point to a PDF and it shows up in Classic on the Account detail page but not in LIghtning. It is the only custom button I am trying to display on the detail page.

Can anyone confirm if they are just not supposed to work in LEX? 
Anoop SharmaAnoop Sharma
did anyone get the solution yet?
タン ビン チャンタン ビン チャン
I have the same problem. URL button is shown on lightning, but javascript button cannot be shown. I see tutorial on this japanese page but unsuccessful
Anoop SharmaAnoop Sharma
It's working now
Jonathan HorlingsJonathan Horlings
Try 'reverting' the buttons in the 'Salesforce Mobile and Lightning Experience Actions'... then see if you can place the custom button there. I was having a similar issue -- and that was what fixed it for me! 
Cody CusicCody Cusic
@Jonathan Horlings, your answer helped me.  I didn't even have to revert, just had to add the custom button in the 'Salesforce Mobile and Lightning Experience Actions' and it showed in the Lightning Highlights Panel.
Chakradhar BoiniChakradhar Boini
  1. When we create a button it will be available in ‘buttons’ and ‘Mobile and Lightning Actions’ sections of page layouts.
  2. Adding the new button only to buttons section of page layout will display it in classic only
  3. Adding the buttons in ‘Mobile and Lightning Actions’ will display it in mobile and lightning experience
Teena PSTeena PS
Hi Chakradhar,
Please can you tell us how to add the custom button in mobile & Lightning Actions.
Thanks in Advance
Teena PSTeena PS
Let me explain more in detail. 

1. Created button is On-click Javascript button which is visible in Classic Pagelayout but not in Lightning. 
2. Not able to add this button to Mobile & Lightning Actions. It is not showing under this section only. 
Screenshots shared below.
User-added image
User-added image
not to able see this button under mobile & lightning actions
Kindly help
brijesh bhatiabrijesh bhatia
Instead of buttons, use the Mobile & Lightning Actions and add the button there. This will make it visible.
User-added image

Madhuri KulkarniMadhuri Kulkarni
Hi Brajesh,
I have aList button which is a javascript button and on-click it just collects all selected ids and constructs a url with slected records and opens up a new page with records selected in the first page. Since it's ajavascript button it does not show up in LEX. I read the TrailHead, but could not see example for how to get the lust of items selected. I need example or tutorial of mass actions on list view records. Kindly help

Tester AnonymousTester Anonymous


Please excuse me for attempting to ask a question in related to the creation of new button. I would like to know how did you create a new customized button instead of the default customized button provided by salesforce platform? -

Question: Did you write your own javascript?

-> if yes, where did you save the javascript and how do I upload my javascript to the platform? 
-> if no, could you please tell me the way of getting a new customized button based on my javascript or new button based on my preference and not the default customized?

I tried to check on the customize tab within the page layout tab but I could not find a way to make new button from there. I wish to create a download button and attached it into the "task". Please do share your knowledge with me if it is possible.

Thank you in advance.  

Goldie GoldenGoldie Golden
It is my understanding that not all buttons that work in classic will work in Lightning/LEX. If they were written in Javascript then they need to be made lightning ready.  I don't know yet how to do this. In my case, I am taking my need back to the app folks who made the app that has the button in it that shows up just fine in classic, but not in Lightning.
Ajesh PillaiAjesh Pillai
hey Denise jonathan answer will solve your issue, add the button from mobile and lighting experience in page layout
Shawn LowShawn Low
Just as a small add, I am finding out that the Profile of the User is a factor. When I log in as a Test user, to test out functionality, and the Profile for the test User does NOT have "View Setup & Configuration" checked, and that test user does not see the Lightning Action button.
As soon as I check that box on the profile, that test user can now see the Ligyhtning Action button.
That to me, is so odd and strange and makes NO logical sense, but apparently that's the way SFDC set this up.
KVP ConsultingKVP Consulting
Hello, I have a custom button which on CLick populates the custom field. The custom button has been added correctly to Page Layout but still not visible. Please advise.
Developers SamespaceDevelopers Samespace
Salesforce is the worst product ever. I have never seen a mofre confusing product than this. Simple things don't work. Very sad.
@KVP Consulting

Have you added the custom button from  both highlighted places in their respective sections:
User-added image
Simon AnlezarkSimon Anlezark
I have a custom button that launches a Flow and I was having a similar problem today.  It appeared for me no problem, but wouldn't appear for any other profiles.

Turns out, I needed to give the profiles the "Run Flows" permission.
Tray WilliamsTray Williams
Just FYI, I had this same issue. The problem was that I selected to override the global publisher layout for "Quick Actions int he Salesforce Classic Publisher" and "Salesforce Mobile and Lightning Experience Actions". Once I reverted back to the default, my button showed up in Lightning. 

User-added image
Gautam JagannathGautam Jagannath
@Tray Williams thank you so much! You solved the problem for us.
Paweł AugustynPaweł Augustyn
Does anybody know how to show buttons without revert "Salesforce Mobile and Lightning Experience Actions" to default?

It seems, that when ""Salesforce Mobile and Lightning Experience Actions" = default buttons appear, and when I edit those actions, buttons are gone.