0

I'm building a visualforce page to show all contacts related to an individual object.

Currently, if a user can't see a contact, he won't be able to see it in the Contact related list on the Individual record. I would like to bypass this via a visualforce page, to allow a user that doesn't have visibility over those contact records to see them in the related list (they still can't edit or open the record). Is there any way I can bypass standard Salesforce visibility rules to achieve the above?

<apex:page docType="html-5.0" standardController="Individual">
<apex:relatedList list="Contacts"/>
</apex:page>

Thank you!

1

To override standard visibility, you need to write Custom Controller which will run in System mode rather than user mode.

And hence, even if user doesn't have access to Contact will able to see those.

For more information, refer Building a Custom Controller

  • Would creating a custom controller for this particular task be better than creating an extension? – Eliijahh Jul 30 '18 at 15: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.