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
Chayan AroraChayan Arora 

Override standard delete button no option display for lightning Component?

Hi All,

I want to override standard delete button with lightning component but option not display.User-added image
NagendraNagendra (Salesforce Developers) 
Hi Chayan,

There are six standard actions available on most standard and all custom objects: Tab, List, View, Edit, New, and Delete.

Lightning Experience and Salesforce1 combine the Tab and List actions into one action.

Lightning components can be used to override the View, New, Edit, and Tab standard actions in Lightning Experience

You can only override the Tab action with a Lightning component, so you can’t use a component to override the List action.

As delete action doesn't fall under tab or list actions category you might not be getting the option.

May I suggest you please check with tab or list action if the option is available?

Please follow the below steps to override the standard actions with the lightning component bundle:

Override a Standard Action with a Lightning Component:

You can override a standard action in both Salesforce Classic and Lightning Experience. While the destination is the same, the navigation paths are different.

Lightning Experience
  1. From Setup, enter an object in the Quick Find box.
  2. Select Object Manager.
  3. Click the name of the object for which you want to override a standard action.
  4. Select Buttons, Links, and Actions.
Salesforce Classic
  1. From Setup, navigate to the object for which you want to override a standard action.
  2. For standard objects, navigate to Build | Customize, and find the object.
  3. For custom objects, navigate to Build | Create | Objects, and find the object.
  4. Click the name of the object.
  5. Scroll to the Buttons, Links, and Actions section.
Once you’re viewing the object’s Buttons, Links, and Actions list, select Edit for the action you want to override. From here, the steps are the same.

For Override With, select Lightning Component Bundle.
  1. From the drop-down menu, select the name of the Lightning component to use as the action override.
  2. Click Save.
Note: Your component needs to implement lightning:actionOverride. This is only available starting in Summer '17

For more information please check with below links. Hope this helps.

Please mark this as solved if it's resolved.

Thanks,
Nagendra
 
Mustafa JhabuawalaMustafa Jhabuawala
Hi Chayan,

Even this seems weird to me. From Summer '17 release we can override the standard buttons with lightning component by implementing lightning:actionOverride

Unfortunately there is no option available to override the delete functionality with the custom lightning component.

Answer to your question is - there is no direct way to override the delete button functionality with lightning component.

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

Useful links - 
Adding lightning components in lightning out app (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/lightning_out.htm)
Lightning Component in Visualforce page with lightning out (https://developer.salesforce.com/blogs/developer-relations/2016/02/lightning-components-visualforce-lightning.html)

Note - Kindly mark this answer as a best answer if this helped you, so that other's can also get benefit from it.

Thanks,
Mustafa Jhabuawala
Technical Lead at Zen4orce (http://www.zen4orce.com)