I have a VF page where the end user with a specific profile updates the case in that page.Others Edits in standard page.

The End user with a specific profile should not able to see the edit button when he views the record or edit link when it is searched from global search.

Solutions Tried not working:

1.This is happening due to edit permission in profile.If I remove EDIT PERMISSION he cant update through API.

2.I am overriding standard button with VF page for specific Profile. But the script is recursively loaded for that specific profile since edit link is called once again.

<apex:page standardController="Case">
  <script type="text/javascript">
      if('{!$Profile.Name}'=='System Administrator'){


1.Is there any solution to hide the edit button, and allow access through API.

2.Can we Use VF page for one profile and standard edit page for another profile for edit button.

Please provide me solution for this issue.


You can override a Edit button with a Visual force page.

Keep the Edit permission True for all profiles.

While Loading a Custom Visual force page, check the Profile of a logged in user.

If some users (with particular Profile) don't need to view this page then display an error message saying "You are not allowed to access this page".

  • If some users (with particular Profile) don't need to view this page, I have to display the standard edit page. That's the problem. – Sathish Sep 16 '16 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.