I do have a Visualforce page on the section of the Contact record detail page. I would like to show/hide this section(not just the Visualforce page) to specific number of users(different Profiles). How can I approach to a solution?

Note: I could render the VF page, but still I can have the Section which is empty. So if there is a simpler way to hide/show the section itself, that would be great. Any ideas would be greatly appreciated.


There is a way, but it's not "simple". You need to use multiple page layouts. You can assign a different page layout to each profile. Unfortunately, this means basically maintaining two different versions of a layout. However, this would most likely be the ideal choice if you don't want to have a useless gap in your page layout.

  • Well, this was in my mind and could be the ideal solution. Can I use a permission set with the new page layout(default), and assign it to the users whom I would like to provide the access to the VF page? – Austin Evans Apr 23 '18 at 20:43
  • @AustinEvans Nope, you can only assign page layouts via profiles, so they would necessarily need to have different profiles. – sfdcfox Apr 23 '18 at 20:48
  • That makes sense to me. Thank you for your response. You will soon mark the 200K on the SFSE. Very happy to get answers(my today's two questions) from you, that made my day :) – Austin Evans Apr 23 '18 at 20:53
  • @AustinEvans Always glad to help when I can. – sfdcfox Apr 23 '18 at 20:59

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.