Sub topic 11
Permissions, Field-Level Security, and Sharing
This chapter assumes you can build a basic report, know what a custom report type is, and understand objects, fields, and profiles or permission sets. It explains why two users running the same report see different results.
Three layers decide what a report shows
A report type defines which objects and fields a report can use. It does not decide which records or field values a given user sees. Three separate layers do that, and they are checked each time a user runs the report.
| Layer | Question it answers | Effect when it blocks access |
|---|---|---|
| Object permissions | Can the user read this object? | The report type or related object is unavailable. |
| Field-level security | Can the user see this field? | The field is hidden from the report. |
| Sharing | Can the user see this record? | The record's row is left out. |
Object permissions
A user needs the "Read" permission on the primary object to use a report type. For a custom report type, the user also needs "Read" on each related object that is part of the join.
If the user cannot read the primary object, the report type does not appear in the report builder. If the user cannot read a related object, the related object's fields are not available to that user, and the rows that depend on that object are affected as described in the join section of this chapter.
Users also need a report permission, such as "Run Reports", to run reports at all. Folder access controls who can open a saved report.
Field-level security
Field-level security (FLS) controls whether a user can see a field. A custom report type can list a field in its layout, but the user only sees the field if their FLS allows it.
- A field the user cannot read does not appear in the column picker.
- A field the user cannot read cannot be used as a filter or a grouping.
- If a saved report already uses a field the user cannot read, that column and any filter on it are not applied for that user.
The field layout of the report type is therefore the widest set of fields available. Each user's FLS narrows it.
Sharing
Sharing controls which records a user can see. It comes from organization-wide defaults, the role hierarchy, sharing rules, teams, and manual shares. A report returns only the records the running user can access.
Sharing applies to every object in the report type. For a type such as "Accounts with or without Contacts", the user's access to each account and each contact is evaluated separately.
- With "A with B", an account appears only if the user can see the account and at least one of its contacts.
- With "A with or without B", an account the user can see still appears when the user can see none of its contacts. The contact columns are blank.
Some reports skip the sharing check. In a dashboard, the running user can be set to a different user, and the dashboard shows data based on that person's access. A report that shows "All" records also respects sharing unless the user has the "View All Data" permission, which ignores record sharing.
Example: same report, different results
Suppose a report on "Accounts with Contacts" has the columns Account Name, Contact Last Name, and Annual Revenue. Two users run it.
- A sales manager sees all three columns and 120 rows.
- A support agent has no FLS access to Annual Revenue and sees only two columns. The agent can see fewer contacts under the sharing settings, so the report shows 45 rows.
The report type is identical. Only the access of each user differs.
Troubleshooting checklist
When a user reports missing columns or rows, check in this order:
- Does the user have Read on the primary and related objects?
- Does their profile or permission sets grant FLS on the missing fields?
- Can the user see the missing records under the sharing model?
- Is the report type a "with" join that drops rows without related records?
Exercise
A user runs a saved report built on a custom report type. The report shows fewer rows than the creator's version, and the Annual Revenue column is missing. Name the two layers that explain this and what each one removed.
Show answer
Field-level security removed the Annual Revenue column, because the user cannot read that field. Sharing removed rows, because the user cannot see all the records the creator can see. The report type is the same for both users.