override standard button with lightning components

Override Standard Buttons With Lightning Component – Lightning Experience

Admin Configuration, Lightning Component

Sharing is caring!

 Till Spring 16, we do not have ability to override standard buttons with lightning component. ( Ofcourse we have an ability to override standard button with visualforce page and we can embed lightning component. But some of the features are not available in Lightning components created via visualforce pages). Summer 17 upgrade will help us in overriding standard buttons in Lightning.

Follow below steps on how to achieve this. Here we are going to override the standard New button in Account object with a sample custom lightning component.

Step 1: Create Lightning Component And Apex Controller

Create a component by implementing interface lightning:actionOverride 



Step 2: Override Standard Button With Lightning Component
  • Go to Setup >> Object Manager >>  Account >> from Buttons, Links and Actions section edit standard button [for this i have override New button]

override standard button with lightning component sfdcmonkey


  • Select your Lightning Component Bundle from dropdown.

override standard button with lightning component sfdcmonkey


You can skip record type selection page by check Skip Record Type Selection checkbox when overriding the New or Standard Action.

Hit Save. That’s it 🙂

Let’s check how it works.

  • Go to Accounts and click on [New] button and create new account.

override standard button with lightning component sfdcmonkey

( Of course this component can look much better but as it is a demo on actionoverride interface, we just added 2 fields with less styling ).

This table lists the standard actions you can override for an object as the actions are named in Setup, and the resulting action that’s overridden in the three different user experiences.

Override in Setup Salesforce Classic Lightning Experience Saleforce 1
Tab object tab object home search
List object list n/a object home
View record view record home record home
Edit record edit record edit record edit
New record create record create n/a
Delete record delete record delete record delete


Summer 17 release notes

Lightning Developer guide

About The contributor: 

Sharing is caring!

(Visited 3,105 times, 4 visits today)


  • When I select “Skip RecordType Selection”,when overriding standard “New” button, it is still showing the record type selection. Any idea what I am doing wrong?

    Also I am unable to get recordId when I am trying to create a child record (related list) from the parent record.

  • This solution doesn’t override new record buttons in lightning lookup fields so you can still create records by clicking New <Some Record> inside a look up field in lightning and the override action won’t get triggered.

Leave a Reply