0

We developed a visualforce page and tested it with a System Administrator account and it works fine. Now we created a new "Standard User" account and try to access the same page and get this error:

Insufficient Privileges You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.

We tried simplifying the page completed to just the following code but the error persists:

<apex:page >
 hello world

</apex:page>

Any insight?

  • goto to new profile page, click 'Enabled Visualforce Page Access', click edit, add pages you want to be accessible – Ilya Lepesh Jul 16 '16 at 18:39
2

You need to give permissions to see the VF page to the user.

You can either add it to the "Standard User" profile or create a permission set for it. The former is easier:

  • Setup > type "Profiles", click on it to select
  • Click on "Standard User"
  • At the top, click the link "Enabled VisualForce page access"
  • Click on the "Edit" button
  • Select the page(s) you want to give access
  • Click "Save"

Your user should be able to view the page now

  • 2
    For this one, it's obviously the Visualforce page that's the security issue. If there's an Apex Controller for the page, that needs to give permissions to users as well – Jagular Jul 16 '16 at 18:58
  • Great, that worked. Do you have any suggestions for making this change when the package is installed so the organization admin doesn't have to worry about it? @mkorman – user1813867 Jul 18 '16 at 21:27
  • I would add a permission set to your package, giving access to that apex page. The sys admin would still have to assign the permission set. OR tell him to install the package for all users or for the selected profiles. Not 100% sure about the latter so I would test it first – mkorman Jul 18 '16 at 22:48

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.