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
krishna guptakrishna gupta 

How to override delete button and display custom message using aura or LWC component

SwethaSwetha (Salesforce Developers) 
HI Krishna,
Hope the code in https://www.forcetalks.com/blog/how-to-override-standard-buttons-with-lightning-component/ will help you get started

 Thank you
krishna guptakrishna gupta
Hi Swetha,

For delete standard button, we don't have option to select the lightning component. Can you help me with the delete button?
SwethaSwetha (Salesforce Developers) 
Looks like there is no direct way to override the delete button functionality.
See https://salesforce.stackexchange.com/questions/282979/override-standard-delete-action-on-account-object

You might want to try the approach suggested in https://developer.salesforce.com/forums/?id=9060G000000UbhIQAS

"Create Lightning Out to run Lightning components in visualforce page and then you can use that visualforce page and override the delete button functionality."

Hope this helps!