I have a opportunity page layout and it is assigned to a profile.

In this page layout, i am having a section which has vf page.The VF page can be accessed only by permission set users. If the non permission set users login and view the opportunity, then it is showing error as "Content cannot be displayed: You do not have sufficient privileges to access the page: /apex/Document_Upload".

How to resolve this error? Kindly advise.

Regards, Abinaya S

  • In permission set have you added the corresponding vf page and assigned the permission set to corresponding users?
    – Reshma
    Sep 26 '16 at 10:27
  • If you want this page can be accessed by everyone then just go to their profile and add this VF page in their profile. Sep 26 '16 at 10:59
  • Please tell what exactly is your expected behavior because I think you are describing a good behavior Sep 26 '16 at 11:18
  • Hi @ Itai Shmida,
    – abinaya
    Sep 27 '16 at 6:04
  • I want to display an inline vf page to 2 users in a profile. But the profile has many users. So I have created a permission set & added the 2 users to the permission set. I gave permission to vf page for both profile as well as permission set because if i dont give access to the profile it is displaying the error message like "Content cannot be displayed: You do not have sufficient privileges to access the page" . When I give access to both profile and permission set, vf page is displayed properly for the permission set users. The other profile users are displayed with empty space
    – abinaya
    Sep 27 '16 at 6:20

Provide access to that inline visualforce page to all the profiles and display the content in the page only to permission set user.

  • Thank you. I have a another doubt here how to hide a section using permission set?
    – abinaya
    Sep 26 '16 at 13:01
  • Make use of rerender functionality. Sep 26 '16 at 13:19
  • I have embedded the vf page as a section in standard pagelayout.
    – abinaya
    Sep 26 '16 at 13:42
  • In your inline visualforce page , fetch all the users who have access to the permission set and display or hide based on your requirement. Sep 26 '16 at 13:46
  • 1
    I am displaying the page to the users who has access to the permission set. If the user has permission for vf in both the profiles and permission set, vf page is displaying for the user. If a user does not have access to the permission set and have access with the profile, it is showing empty space.
    – abinaya
    Sep 27 '16 at 5:23

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.