Sub topic 10
Refreshing, scheduling and subscribing
This chapter explains how dashboard data stays current. It covers manual refresh, scheduled refresh, subscriptions, and how each interacts with the running user and with dynamic dashboards.
It assumes you can build a dashboard from a summary report, that you know the difference between a static running user and a dynamic (logged-in user) dashboard, and that you have basic admin or dashboard-owner access in Lightning Experience.
What "fresh" means for a dashboard
A dashboard does not query records each time someone opens it. Each component reads from a source report, and the dashboard stores the result of its last refresh. When a user opens the dashboard, Lightning shows that stored result with an "As of" timestamp. Changing a record does not change the dashboard until a refresh runs.
This explains a common complaint: "I closed the opportunity, but the pipeline chart still shows it." The report, if you run it directly, shows current data. The dashboard shows the last stored snapshot.
Three mechanisms update the snapshot:
- Manual refresh: a user clicks Refresh on the dashboard.
- Scheduled refresh: the platform refreshes the dashboard at a set time.
- Subscription: a user asks for a refreshed copy of the dashboard by email on a schedule.
Manual refresh
Any user who can view the dashboard can click Refresh at the top of the page. The click re-runs every source report and updates the components.
What the refresh uses depends on the dashboard type:
| Dashboard type | Manual refresh runs as | What the clicker sees afterward |
|---|---|---|
| Static (specified running user) | The running user | Data visible to the running user |
| Dynamic (logged-in user) | The person who clicked | Data visible to that person |
For a static dashboard, a refresh by a sales rep still shows the manager's data if the manager is the running user. For a dynamic dashboard, the refresh is personal. Nobody else sees the result of your click.
Manual refresh has limits. The platform restricts how often a dashboard can be refreshed, and the limit depends on your edition. Salesforce changes these numbers over time, so check the current "Dashboard limits" page in Salesforce Help instead of relying on a figure from a tutorial. In practice, expect the Refresh button to be disabled for a short time after a refresh, and expect repeated clicks to fail with a message instead of producing new data.
Scheduled refresh
A scheduled refresh updates a dashboard automatically, so people who open it first thing in the morning see current numbers without clicking anything.
To set one up in Lightning Experience:
- Open the dashboard.
- Click the Subscribe menu or the scheduling option in the dashboard header, then choose to schedule a refresh. The exact label differs between releases.
- Choose a frequency: daily, weekly, or monthly.
- Choose the days and a time of day.
- Save.
The refresh runs as the dashboard's running user. That has three consequences.
- The data matches the running user's visibility. If the running user can't see certain accounts, scheduled refreshes won't include them.
- The schedule depends on that user staying valid. If the running user is deactivated, or loses access to a source report or its folder, the scheduled refresh fails. Components then show stale data or errors.
- Dynamic dashboards can't be scheduled. A dynamic dashboard has no single running user, so there's nobody to run the refresh as. Users of dynamic dashboards refresh manually, or they subscribe, as described below.
Scheduling also has edition limits: which editions can schedule, how many scheduled refreshes you can have, and which frequencies are allowed. Treat these as governance constraints and confirm them in your org before promising a refresh cadence to a stakeholder.
Subscriptions
A subscription sends a user a refreshed copy of a dashboard by email on a schedule. It differs from a scheduled refresh in purpose:
- A scheduled refresh updates the stored data inside Salesforce.
- A subscription delivers the data to a person. It does not require the person to log in.
To subscribe, a user opens the dashboard and chooses Subscribe. They pick the frequency, the days, and the time. The email contains a snapshot of the dashboard with a link back to it.
Points to know:
- Subscribers need access. A user can only subscribe to a dashboard they can see, which means they need access to the dashboard's folder.
- Managers can add others. Users with the right permission can subscribe other users, groups, or roles. Subscribing a role or group is easier to maintain than listing individuals.
- Subscription limits apply. Editions limit how many dashboards a single user can subscribe to. Admins can find the current numbers in Salesforce Help.
- Subscriptions follow the dashboard type. On a static dashboard, every subscriber receives the running user's view. That is a data-exposure risk: someone with no access to certain records can still see their totals by email. On a dynamic dashboard, the data shown follows each subscriber's own access.
Choosing an approach
The decision comes down to who needs the data, how fresh it must be, and whether it is the same for everyone.
A summary of the trade-offs:
| Need | Best fit | Limitation |
|---|---|---|
| Personal data per viewer | Dynamic dashboard | No scheduled refresh; counts against dynamic dashboard limits |
| Same numbers ready every morning | Scheduled refresh on a static dashboard | Depends on the running user staying valid |
| Numbers delivered by email | Subscription | Static dashboards expose the running user's view |
| Occasional, on-demand checks | Manual refresh | Users must remember to click it; refresh frequency is limited |
A common combination is a static dashboard with a scheduled refresh at 6:00 a.m. and a subscription for leadership at 7:00 a.m. The gap makes sure the refresh finishes before the email is built. If the subscription and refresh are scheduled at the same time, the email may contain the previous day's data.
Finding dashboards that can't be scheduled
Because dynamic dashboards can't have a scheduled refresh, it helps to know which dashboards in your org are dynamic. Run this SOQL query in the Developer Console or Workbench. It lists dashboards whose running user is the logged-in user.
SELECT Id, Title, DeveloperName, FolderName, Type, RunningUserId
FROM Dashboard
WHERE Type = 'LoggedInUser'If a stakeholder asks "why is there no schedule option on this dashboard?", check whether it appears in this result. If it does, the dashboard is dynamic.
To see the overall mix of running-user types, which also helps when checking dynamic dashboard limits, run:
SELECT Type, COUNT(Id) total
FROM Dashboard
GROUP BY TypeCommon errors
- Dashboard shows old numbers, report shows new ones. Nobody has refreshed the dashboard. Click Refresh, or add a scheduled refresh.
- No scheduled refresh option. The dashboard is dynamic, or your edition or permissions don't allow scheduling.
- Scheduled refresh stopped working. The running user was deactivated, lost access to a source report, or a source report or folder was moved or deleted. Check the running user first.
- Subscriber sees data they shouldn't. The dashboard is static and the running user has broader access. Switch to a dynamic dashboard or choose a running user with narrower access.
- Subscription email is stale. The email was generated before the refresh finished. Schedule the refresh earlier than the subscription.
- Refresh button is disabled. A recent refresh is still within the allowed window, or a refresh is in progress. Wait and retry.
Exercise
A regional manager is set as the running user of a static "Open pipeline" dashboard. It refreshes every morning at 6:00 a.m. and is subscribed by 40 sales reps at 6:30 a.m. After the manager changes roles and loses access to one region, reps report that one region's pipeline disappeared. Separately, the security team is worried about what the reps receive by email. Explain both problems and propose a fix.
Show answer
The scheduled refresh runs as the running user, so when the manager lost access to a region, that region dropped out of every refreshed snapshot. The reps' subscription emails carry the running user's view, not each rep's own, so all 40 reps see the manager's totals, including regions they may not have access to. A fix is to make the dashboard dynamic so each viewer sees their own data, and have the reps subscribe or refresh manually, because dynamic dashboards can't be scheduled. If one shared view is wanted instead, keep the dashboard static but use a stable running user whose access matches the intended audience, and keep the refresh earlier than the subscription.
Exercise
Write a SOQL query that returns the number of dashboards for each running-user type, and explain what the result tells you about scheduling.
Show answer
SELECT Type, COUNT(Id) total FROM Dashboard GROUP BY Type. The rows for LoggedInUser show how many dashboards are dynamic, and those can't be scheduled. Dashboards with other types, such as SpecifiedUser, can use a scheduled refresh if your edition allows it.