Sub topic 16
Troubleshooting: why can't this user see the record?
This chapter assumes you know org-wide defaults (OWD), the role hierarchy, object permissions, and basic SOQL. It gives a repeatable order of checks for a user who cannot see or edit a record.
Work from the outside in
Access is decided in layers. Check them in order, and stop at the first layer that explains the problem.
- Object permission. Does the user's profile or a permission set grant Read (or Edit) on the object? Without it, no sharing setting helps.
- View All or Modify All. If the user has either on the object, or View All Data or Modify All Data, sharing is bypassed and the problem is somewhere else.
- OWD. If the OWD is Public Read Only or Public Read/Write, the user can at least read every record. A missing record then points to the object permission, a filter, or a different cause.
- Ownership. Does the user own the record? Owners always have access.
- Role hierarchy. Is the user in a role above the owner, and is Grant Access Using Hierarchies enabled for this object? Custom objects can switch it off.
- Other sharing. Is there a sharing rule, account team, opportunity team, or manual share that gives access?
Confirm with queries
Do not guess. Ask the platform what the user can do:
SELECT RecordId, HasReadAccess, HasEditAccess, HasDeleteAccess
FROM UserRecordAccess
WHERE UserId = '005XXXXXXXXXXXXXXX'
AND RecordId = '001XXXXXXXXXXXXXXX'If HasReadAccess is false, look at the share rows to see who does have access and why:
SELECT Id, AccountId, UserOrGroupId, AccountAccessLevel, RowCause
FROM AccountShare
WHERE AccountId = '001XXXXXXXXXXXXXXX'The RowCause tells you the mechanism: Owner, Team, Manual, or a rule. If no row matches the user or a group the user belongs to, and the user is not above the owner in the hierarchy, no sharing path exists.
Common causes
| Symptom | Likely cause |
|---|---|
| Manager cannot see a report's record | Grant Access Using Hierarchies is off for a custom object, or the manager sits in a different branch |
| Record visible but not editable | OWD is Public Read Only and no share row grants Edit |
| Access disappeared after an owner change | The old owner's shares and hierarchy path no longer apply, and manual shares may be removed |
| Sharing rule seems ignored | Rule criteria do not match, or the rule targets a different role or group |
| User sees the record but not in a list | Filter, list view scope, or record type, not sharing |
Gotchas
- UserRecordAccess shows the result, not the reason. Pair it with the share table to find the cause.
- Hierarchy access is calculated, not stored as rows for every manager. Absence from the share table does not prove a manager lacks access.
- Opening the OWD to fix one user exposes every record. Add a targeted rule or share first.
Exercise
A sales manager in a role above a rep cannot open the rep's record on a custom object. The OWD is Private and the manager has Read permission on the object. What do you check first, and why?
Show answer
Check whether Grant Access Using Hierarchies is enabled for that custom object. It can be turned off for custom objects, and when it is off the role hierarchy gives the manager no access to records owned by users below. Then confirm with a UserRecordAccess query for the manager and the record.