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
teena jacobteena jacob 

How to override the delete button functionality to update the field in lightning?

Hi ,

       I need to override the delete button in the record when I click on the delete button in need to change a field value instead of deleting.
Best Answer chosen by teena jacob
teena jacobteena jacob
Hi Shiva,

        Thank you, Now I just go with overriding the delete button functionality, let me check if it's not going fine will go with the custom button.

All Answers

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Teena Jacob,
  • TO override Standard Buttons With Lightning Component – Lightning Experience.may I suggest you please refer the below link for reference.

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

Hope it will be helpful.
Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
teena jacobteena jacob
Hi Rahul,

       Thank you for the reply! For override Delete button there is no any option to use lighting component. Initially, I use a custom button with java script but it does not support the lightning feature.
User-added image
Shiva RajendranShiva Rajendran

Hi Teena,

Better create an custom button with the functionality you needed and remove the standard delete button from the layout.

Let me know if your requirement needs some modification to it.

Thanks and Regards,
Shiva RV

teena jacobteena jacob
Hi Shiva,

        Thank you, Now I just go with overriding the delete button functionality, let me check if it's not going fine will go with the custom button.
This was selected as the best answer