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
Abhinav Sharma.Abhinav Sharma. 

Open Custom Lightning Component on Click of a standard save button

Hi All,

We have an requirement where we have to open a custom lightning component once we click on the standard save button in LEX.

If someone implemened the solution or have an idea please share.

Regards,
Abhinav Sharma
Ahmed Ansari 13Ahmed Ansari 13

Hi Abhinav Sharma. 

In salesforce, there is not an option to override the Standard Save Button.

for this workaround :

you have to create Custom Lightning Components  that override the new Button in lightning Experience

as you see in below image:

User-added image

Ajay K DubediAjay K Dubedi
Hi Abhinav,

I have understood your query and found some solutions.You can find it below- 

A Lightning component is required to implement lightning:actionOverride interface to be used to override a standard action on an object. You can override the View, New, Edit, and Tab standard actions on most standard and all custom objects. By overriding standard actions, you can customize your org using Salesforce lightning components along with completely updating the method you view, edit and create new records.

You can get more help from the below link-

https://www.forcetalks.com/blog/how-to-override-standard-buttons-with-lightning-component/

http://sfdcmonkey.com/2017/06/12/override-standard-buttons-lightning-component/



I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com
Deepali KulshresthaDeepali Kulshrestha
Hi Abhinav,

I've gone through your requirement and you should follow below steps to override your lightning component to save button:


Add the Override Interface:

1.On the property record page in your org, click alt text: Setup Icon and select Edit Page.
2.Click on our new Lightning component to select it, then click alt text: Delete component to remove it from the page.
3.Click Save and then Back to return to your property detail page:
     We’re now ready to use the component as a button override, so there’s no need for it to be on the
     page anymore.

4.In the Developer Console, switch back to the PropertyDialog component.

5.Add lightning:actionOverride to the list of interfaces in the aura:component tag.
  It should now look like this:

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride" access="global" >

6.Save the file.
  It doesn't matter what order the interfaces appear in. lightning:actionOverride is the magic 
  interface that instructs Lightning Experience to let us use this component to override a standard
  button or action.


-Set Up the Override:
1.Back in your org, click alt text: Setup Icon and select Setup.
2.Click Object Manager.
3.Click Property.
4.Click Buttons, Links, and Actions.
5.Click alt text: Dropdown menu icon next to New and select Edit.
6.Select Lightning Experience Override as Lightning Component.
7.Select c:PropertyDialog as the bundle to override with.

 alt text: Override with Lightning Component

The select list will list all of the components in your org that have the lightning:actionOverride
interface declaration.

8.Click Save.

9.Click alt text: App Launcher icon and select Dreamhouse Lightning, then click Properties.

10.Refresh this page, and then click New to create a new property.
And there it is! You've overridden the standard New button on the Property object with a Lightning 
component.

 
Note: If you don’t see your new form, then you may need to refresh your page again. Click Properties,
         refresh the page, and then click New.



I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
 
Abhinav Sharma.Abhinav Sharma.
I don't want to override standard buttons i.e. View or Edit.

My requirment is to open a lightning custom component pop up once user clicked on a standard Save Button.
siddharth ahujasiddharth ahuja
Hi Abhinav,
Same requirement,did you get the answer for the same.
Ankita Jena 11Ankita Jena 11
Hi Abhinav,
Same requirement,do you have any updates on this?
Thanks
durga prasad vangalapudi 16durga prasad vangalapudi 16
Hi Abhinav,

Same requirement, any update or how is this achieved?
Thanks,