+ Start a Discussion

Disable delete button

hi!!! Can anyone tel me how to disable delete button .and only admin should have permission to delete button.


i don't no about this.

but on thing u can surely do is

u can take out the access delete acces from all other non-admin profile


CLK is right.  You should be removing delete access at the profile level to prevent users from deleteing.  Even if you created a page layout that didn't include the delete button, users still have the ability to delete through data loader or if they know the right URL hacks.


Edit your profiles and remove the delete access.


Tryout this sample code to disable button :


<apex:commandbutton disabled="{!if($Profile.Name == 'System Administrator',false,true}">

Hi Pradeep, Anitha wants SF Detail Page Delete button to be disabled not Custom VF Page. any ideas?