Sub topic 9
Sharing dashboards and reports through folders
This chapter assumes you can build a report and a basic dashboard, and that you know the running user concept from the previous chapter. It also assumes you know how profiles, roles, and record sharing work. Here you will learn how folders control who can see, run, and edit reports and dashboards, and how that interacts with the running user.
Why folders matter
Every report and every dashboard lives in exactly one folder. Salesforce does not share individual reports or dashboards. It shares the folder that holds them. If you want one person to see a dashboard but not its neighbor, put the two in different folders.
Folder access answers one question: who can open, run, or change this item? It does not answer a different question: which records appear inside it? Record visibility comes from the running user, or from the viewer in a dynamic dashboard. Keeping these two layers separate is the most important idea in this chapter.
| Layer | Controlled by | Decides |
|---|---|---|
| Folder access | Folder sharing settings | Who can see, run, edit, or manage the report or dashboard |
| Data visibility | Running user (or logged-in viewer) and record sharing | Which records the numbers are built from |
Folder types and access levels
Folders come in a few kinds. A private folder, such as your personal folder, is visible only to you. A shared folder is visible to the users, groups, and roles you add to it. Items you create but have not filed anywhere stay in your private space until you move them.
In Lightning Experience, each person or group you share a folder with gets one of three access levels:
| Access level | Can do |
|---|---|
| Viewer | Open dashboards and run reports in the folder. Cannot change them. |
| Editor | Everything a viewer can do, plus create, edit, and delete items in the folder. |
| Manager | Everything an editor can do, plus rename or delete the folder and change who it is shared with. |
The same three levels apply to report folders and dashboard folders. Report folders and dashboard folders are separate. A dashboard folder never holds reports.
Who you can share with
You can grant access to several kinds of audience:
- Individual users.
- Public groups.
- Roles.
- Roles and subordinates, which includes everyone below the chosen role in the hierarchy.
- Partner and customer portal or community roles, if your org uses them.
Prefer groups or roles over individual users. When someone changes jobs, you update their group or role once instead of editing every folder.
Folder access and the running user
A static dashboard shows data as seen by its running user. A viewer who opens the dashboard sees those numbers even when the viewer could not see those records in a report. This is why dashboard folder access is a data-exposure decision, not only a tidiness decision.
Consider the two folders involved:
- The dashboard folder. Viewers need access here to open the dashboard.
- The report folder. The reports that feed the components live here. Viewers of the dashboard do not need access to this folder just to see the dashboard. The person who builds the dashboard needs access to the reports, and so does the running user's data to be returned.
That split is useful. You can keep working reports in a restricted folder while publishing only the finished dashboard to a wide audience. The cost is that a viewer who clicks a component to see the source report may be blocked if they cannot open the report folder.
Setting up a shared folder
Follow this sequence when you create a folder for a team.
- In the Reports or Dashboards tab, choose New Folder.
- Give the folder a clear name that states its audience, such as "Sales Management Dashboards".
- Save the folder.
- Open the folder's menu and choose Share.
- Pick the audience type (user, group, role, or role and subordinates), search for the audience, and set an access level.
- Add each audience, then choose Done.
To publish a dashboard, save it into that folder or move it there. If you move a report that feeds a dashboard component, check the dashboard afterward. A component can fail if the running user can no longer reach the report in its new folder.
Permissions that sit above folder access
Folder access is not the only gate. User permissions decide what someone can do at all, before the folder is considered.
| Permission | Effect |
|---|---|
| Run Reports | Needed to run any report. |
| Create and Customize Reports | Needed to build and edit reports. |
| Create and Customize Dashboards | Needed to build and edit dashboards. |
| Manage Dynamic Dashboards | Needed to create dynamic dashboards (running user set to the logged-in user). |
| Manage Reports in Public Folders and Manage Dashboards in Public Folders | Let a user edit or delete items in public folders, regardless of the folder access level. |
A user with Viewer folder access and the "Create and Customize Dashboards" permission still cannot edit a dashboard in a folder where they are only a viewer. Both gates must allow the action. Conversely, an Editor level in a folder does nothing for a user whose profile lacks the permission to create dashboards.
Dynamic dashboards and folders
A dynamic dashboard runs as each viewer, so each person sees only the records they could already see. Folder access still applies. A viewer must have Viewer access to the dashboard folder to open the dashboard, and the data shown follows that viewer's own sharing. The dashboard folder controls who can open it, and the viewer's own visibility controls what appears.
Because dynamic dashboards are limited by edition, plan which dashboards truly need this mode. A common pattern is one folder of dynamic dashboards for personal performance views, and a second folder of static dashboards for management summaries with a deliberately chosen running user.
Auditing folders with SOQL
You can inspect folder setup with SOQL, for example in the Developer Console query editor. This query lists dashboard folders and how they are shared at a high level:
SELECT Id, Name, DeveloperName, Type, AccessType
FROM Folder
WHERE Type = 'Dashboard'AccessType shows whether a folder is hidden (private), public, or shared. To see which dashboards sit in a particular folder, filter the Dashboard object by FolderName:
SELECT Id, Title, DeveloperName, FolderName, Type, RunningUserId
FROM Dashboard
WHERE FolderName = 'Sales Management Dashboards'Review the Type and RunningUserId columns together with the folder. A broadly shared folder that contains dashboards run as a single high-privilege user is the first thing to look at in a governance review. These queries show folder contents and running users. The exact audiences granted access are best checked in the folder's Share dialog.
Common mistakes
- Sharing the report folder instead of the dashboard folder. Viewers need the dashboard folder. Opening up the report folder exposes working reports you may not want to publish.
- Giving everyone Editor. Editors can change or delete shared content. Most viewers should stay viewers.
- Forgetting the running user. Folder access seems correct, yet the numbers show data the viewer should not see. The running user, not the folder, controls the data.
- Moving reports without testing. Moving a source report to a restricted folder can leave empty or error components.
- Sharing with individuals. Group and role-based sharing is easier to maintain and audit.
Exercise
A regional manager has Viewer access to the "Sales Management Dashboards" folder. She opens a static dashboard there, and it shows totals for the whole company, even though her role only lets her see her own region's opportunities. Which setting explains what she sees, and what could you change so she sees only her region's data?
Show answer
The dashboard's running user explains it. A static dashboard shows data as seen by its running user, here someone with company-wide access, and folder access only decides who can open it. To show her only her region, convert it to a dynamic dashboard (running user set to the logged-in user, which needs the Manage Dynamic Dashboards permission and available edition capacity), or move her to a separate dashboard whose running user sees only her region.
Exercise
A user has the "Create and Customize Dashboards" permission but only Viewer access to a dashboard folder. Can she edit a dashboard in that folder? Why or why not?
Show answer
No. Editing needs both the user permission and at least Editor access to the folder. The permission lets her build dashboards in places where she has Editor or Manager access, but Viewer access in this folder blocks changes there.