I want to place a custom button in standard opportunity detail page in lightning experience. When a user clicks on the button i want to navigate to custom lightning component which receives the opportunity id.

I can't able to find a straight solution for it. Is there any workaround available for this ?

2 Answers 2


With Winter '17, you'll be able to launch a Lightning Component from an Action: https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_general_lightning_comp_actions.htm

You can also check this great blog post from Andrew Fawcett: https://andyinthecloud.com/2016/08/21/winter17-using-a-lightning-component-from-an-action/


In current version of Salesforce (Winter '16) there is no functionality of placing custom buttons on standard object pages.

Hopefully this will be available in forthcoming releases (safe harbour).

What you could do is first of all enabling the feature in setup for lightning experience that let you configure lightning experience record home pages (Opportunity detail page in this case).

Then you need to create your own lightning component with a button in it. In the record home page editor then drag-and-drop your lightning component onto the detail page of the opportunity.

Make sure you add the needed javascript code in the lightning component controller to navigate to your lightning page.

Cheers Peter

  • JS buttons are being phased out in favor of Actions. In particular, since Required JS resources no longer automatically load until called, buttons are NOT a good practice to use with pages in general and lightning in particular. They're also not supported with Salesforce Mobile. I do not expect to see more buttons added to Lightning pages in the future.
    – crmprogdev
    Commented Nov 7, 2015 at 4:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .