Sub topic 7
The running user and what viewers can see
This chapter assumes you can build a summary report, create a dashboard with components, and that you know how profiles, roles, and sharing rules control record access in Salesforce. Here you will learn how the running user setting decides what data a dashboard shows.
What the running user is
Every dashboard runs under one user's access. That user is the running user. Each component pulls its data from a source report, and Salesforce runs that report as the running user. It does not run it as the person looking at the dashboard.
This has a consequence that surprises many admins. A viewer can see numbers on a dashboard that they could never see by running the underlying report themselves. The viewer sees the running user's view of the data.
Three ways to set the running user
| Setting | Data shown | Typical use |
|---|---|---|
| Specific user | Everything that user can see, for every viewer | Company-wide or team-wide metrics |
| Run as logged-in user (dynamic dashboard) | Each viewer's own data | Personal quotas, "my open cases" |
| Dashboard folder with a specific user | Same as the first row, set at creation | Shared executive views |
A specific running user gives everyone the same numbers. A dynamic dashboard changes the numbers for each viewer. The next chapter covers dynamic dashboards in detail.
Worked example
Suppose an open-pipeline dashboard uses a summary report of open opportunities grouped by stage. Its data corresponds to this query:
SELECT StageName, SUM(Amount) total
FROM Opportunity
WHERE IsClosed = false
GROUP BY StageNameConsider two setups:
- The running user is a sales director with access to all opportunities in the region. Every viewer, including a rep who can only see their own deals, sees the regional totals.
- The running user is the logged-in user. The rep sees totals for their own opportunities. The director sees the regional totals.
Both setups use the same report and the same components. Only the running user setting differs.
Choosing a running user
Pick the running user with these questions in mind:
- Should every viewer see the same numbers? Use a specific user.
- Should viewers see only their own records? Use the logged-in user setting.
- Is the data sensitive? Choose a running user whose access is no broader than the audience should see.
A common mistake is to set an administrator as the running user for convenience. This exposes all data the administrator can see to everyone with access to the dashboard folder.
Common errors
- Empty components. The running user may lack access to the records, or the report's folder may not be visible to the running user. Check the running user's access first.
- Different numbers than a viewer's own report. The viewer's report runs with their access. The dashboard runs with the running user's access. The two can legitimately differ.
- Dashboard breaks when the running user leaves. If the running user is deactivated, the dashboard can no longer refresh with that identity. Use a stable, dedicated integration or role-based user, and review running users when staff change.
- Running user cannot be selected. The person editing the dashboard needs the permission to choose other running users, which is granted by the "Manage Dashboards" or similar permission in your org's setup.
Checking your setup
After saving a dashboard, open it as a different user, or use "Login as" where your org allows it. Compare the numbers with the source report run by that user. If they match, the dashboard is likely set to the logged-in user. If they match the running user's report instead, it uses a specific running user.
Exercise
A rep can see only their own opportunities. A dashboard uses a specific running user, a sales director with regional access. What totals does the rep see on the dashboard, and why?
Show answer
The rep sees the regional totals. The dashboard's source reports run with the running user's access, not the viewer's, so the rep's own record access does not limit what the components show.
Exercise
You want each service agent to see only their own open cases on one shared dashboard. Which running user setting do you choose?
Show answer
Run as the logged-in user, which makes it a dynamic dashboard. Each agent's view is then based on their own record access.