+ Start a Discussion
Amit Raghuvanshi 6Amit Raghuvanshi 6 

How to override the delete action of custom list view as pointed

User-added image
when i click delete it deletes all the custom views but i want to override the action performed by the delete.
NagaNaga (Salesforce Developers) 
Hi Amit,


If you remove the "Delete" permission in a user profile's object settings, they will not be able to delete the custom object from any view.

Setup >> Manage Users >> Profiles >> (Profile) >> Object Settings >> (Your custom object) >> Edit >> Uncheck "Delete"

Alternatively, you can also "Override" the delete button with a Visualforce page that has an error message:
Setup >> Create >> Objects >> (Your custom object) >> Buttons, Links, & Actions >> Edit the Delete button

Best Regards
Naga Kiran
FredrickUNFredrickUN
Hey,

If you want to restrict users from being able to delete global views then you need to untick the admin permission "Manage Public List Views".

If you don't want the users to be able to create list views then you need to untick "Create and Customize List Views"

cheers
F