2

I have queried the UserRecordAccess table previously to determine a user's permission for records.

Is there a way to go one step further and determine why the values are what they are?

For example, if a user has access to account ABC I would like to find out which Profile, Sharing Rule, etc. was responsible for enabling access.

  • A bit wide question to give an answer, I asked something similar salesforce.stackexchange.com/questions/1508/… but as of today I dont think you can grab all easily. You may have to write too much code for getting this basic info – Rao Sep 4 '13 at 17:03
1

UserRecordAccess does not tell you why a user has access, for its purpose is to tell you the user's effective access level without the hassle of checking a half-dozen different objects to determine a user's effective level.

Sharing is determined by the least restrictive of:

  • Organization Wide Defaults
  • Explicit Sharing
  • Ownership
  • Role Hierarchy
  • Permission Sets
  • Profile Permissions
  • Sharing Rules

The user might have several reasons why they have a particular level of access (e.g. a sharing rule plus role hierarchy). You can query most of the other settings to determine why, if you really need to.

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.