is it possible to access certain models on the page with permissions that differ from the page user?

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I need to be able to render a button based on a field on our object that not all users have read access to. The problem is that I need both options (no read access with button access, no read access no button access either). This means that I cannot just add 'undefined' to my render criteria.

Is it possible to create a model that has no layout fields and queries the object with admin or similar access level? 
Photo of Jerry

Jerry

  • 1,150 Points 1k badge 2x thumb
  • Curious

Posted 2 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Yes &  No.

Not without an additional model.

Create on model on this object. It will allow you to evaluate a users' access rights on any record.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_userrecordaccess.htm
(Edited)