You need to sign in to do that
Don't have an account?
Knowledgeseeker
How do I Add the "Delete" Button for System Administrator Profile only?
How do I code/add the "Delete" button to standard objects (Accounts/Opportunities) for my custom Visualforce pages. So that it restricts the delete button to only System Administrators, which is what we had prior to going live with the custom Visualforce pages.
Currently it is setup that no Profiles can see the "Delete" button, i only know how to make either all Profiles see the "Delete" button or All Do not see the "Delete" Button.
Any help is greatly appreciated!! Thank you in advance!
- Jeremy
One solution is to create 2 VF Pages
1) With Delete Button
2) Without Delete Button
The System Admin Profile should be able to see on the VF page with Delete Button. All other profiles would see the VF page wihout Delete Button.
Another Solution is restrict the permission to Delete the Record to Non- System Admin users using Profile Permissions that way, the users will still be able to see the Delete Button but won't be able to delete the record.
One more solution:
In the VF page check the Profile of the Logged In user using $User.Profile==Administrator and make the button visible only fi the condition is true.
Let me know if that helped
This sounds like it could be the best answer. Would you mind describing how to do this specificly (i.e. step-by-step, screenshots) or could we possibly do a quick Webex?. Solving this is extremely important to myself and our org. Further assistance is greatly appreciated. Let me know, if you could, Thank you PratzJ - Jeremy
Just to be clear on my last post...the solution I'm refering to is below (the one i'd like clarified)
"One more solution:
In the VF page check the Profile of the Logged In user using $User.Profile==Administrator and make the button visible only fi the condition is true.
Let me know if that helped."
THANK YOU