Sub topic 2
The release timeline: preview, sandboxes, production
This chapter covers the order in which a Salesforce release reaches your orgs and the dates you need to track. It assumes you know what a sandbox is, can find Setup, and have used a command line. The chapter after this one covers how to choose which sandboxes join the preview.
Why the timeline matters
Every Salesforce org is upgraded on a published schedule. You cannot opt out of a release, and you cannot delay it for your production org. What you can control is how early you see the new release and how much testing you finish before production changes.
The timeline gives you that early view. Salesforce upgrades some environments weeks before production. The time between those upgrades is your testing window.
The sequence of events
A seasonal release moves through a repeating series of stages. Exact dates change every release, so always confirm them for the release you are preparing for.
- Release notes and preview announcements. Salesforce publishes the schedule and the release notes ahead of the preview. Read these first, because they tell you what to test.
- Sandbox preview. Sandboxes on the preview instances are upgraded to the new release several weeks before production. Production stays on the current release.
- Pre-release orgs and preview scratch orgs. Salesforce also offers pre-release orgs and scratch orgs on the new release, so you can test new features in a clean environment.
- Production upgrades. Production orgs are upgraded in waves over several weekends, each on a different instance.
- Post-upgrade period. Non-preview sandboxes are upgraded around the same time as production. After that, all environments are on the same release.
Preview versus non-preview sandboxes
During the preview window, your sandboxes fall into two groups.
- A preview sandbox runs the new release before production does. Use it to find problems early.
- A non-preview sandbox stays on the current release until the production upgrade period. Use it for work that must match production, such as hotfixes.
The difference matters because code and metadata move between environments. A preview sandbox can hold features or metadata that production does not support yet. The next section explains why that limits what you can move.
| Environment | Release during the preview window | Typical use |
|---|---|---|
| Preview sandbox | New release | Regression testing, early look at new features |
| Non-preview sandbox | Current release | Urgent fixes, work that must stay releasable to production |
| Production | Current release | Live users |
| Preview scratch org | New release | Clean, short-lived tests of new features |
How sandbox refresh affects the choice
Whether a sandbox is on a preview or non-preview instance depends on the instance it lives on. When you create or refresh a sandbox, it is placed on an instance. Salesforce publishes the list of which sandbox instances are in the preview each release. Check that list before a refresh, because refreshing a sandbox in the window can move it to a different group than you expect.
Plan refreshes with the schedule in hand. If you refresh your only full-copy sandbox during the preview, you might lose the environment you had prepared for testing.
Deployment limits across versions
The most common mistake in the preview window is moving changes in the wrong direction.
You can usually deploy from a non-preview sandbox up to a preview sandbox. You often cannot deploy from a preview sandbox down to production, because production is still on the older release. Changes that use new metadata fields, new components, or new behavior can fail to deploy.
Use these rules as a starting point.
- Build and test urgent fixes in a non-preview sandbox, so they can still reach production.
- Treat the preview sandbox as a test environment, not a development environment for production changes.
- If you must keep developing on a preview sandbox, avoid new-release-only features until production is upgraded.
Production upgrade waves
Production orgs are not all upgraded on the same night. Salesforce upgrades them in groups, usually over three weekends. Each org belongs to an instance, and the instance determines the weekend.
To find your date, look up your instance. You can see it in Setup under Company Information, in the Instance field. Then check the release schedule for that instance.
Two practical results follow from the wave structure.
- Two orgs in the same company can be upgraded on different weekends. If you manage several production orgs, track each one separately.
- Other customers on earlier waves may report problems before your upgrade. Watch community posts and known issues during that time.
Trust status and maintenance windows
Upgrades happen during planned maintenance windows. Salesforce publishes the status of each instance, including upcoming maintenance, on its Trust site. Subscribe to notifications for your production instances and your sandbox instances.
During a maintenance window, expect brief read-only or unavailable periods. Do not schedule data loads, integrations that write data, or deployments in that window. The next weekday after an upgrade is when most user-visible problems appear, so keep your team available then.
Mapping the timeline to your own calendar
Salesforce dates are fixed, but the work around them is yours to schedule. Convert the published dates into your own plan. The table below shows one way to do that.
| Salesforce milestone | Your action | Suggested lead time |
|---|---|---|
| Release notes published | Assign reviewers, start filtering for your org | As soon as published |
| Sandbox preview begins | Start regression testing in preview sandboxes | First week of the preview |
| Mid-preview | Fix defects, raise cases with Salesforce for suspected platform bugs | During the window |
| Weeks before production upgrade | Finish regression testing, send user communication | At least one to two weeks before |
| Production upgrade weekend | Freeze deployments, stay clear of the maintenance window | The whole weekend |
| First weekdays after upgrade | Monitor, triage, answer support questions | First several business days |
A freeze on production deployments around the upgrade weekend is a common team policy. It keeps changes from your side from mixing with changes from Salesforce, which makes any problem easier to trace.
Testing during the window with the CLI
Testing early is the point of the preview. You can create a scratch org on the upcoming release by setting the release option in the scratch org definition file.
{
"orgName": "Release Preview Org",
"edition": "Developer",
"release": "Preview"
}Then create the org with the Salesforce CLI. The short duration suits a test that you plan to discard.
sf org create scratch \
--definition-file config/project-scratch-def.json \
--alias preview-org \
--duration-days 7 \
--set-defaultIn a preview sandbox, run your local Apex tests to get a baseline before production is upgraded.
sf apex run test \
--target-org my-preview-sandbox \
--test-level RunLocalTests \
--result-format human \
--wait 20The --wait 20 option makes the command wait up to 20 minutes for results. Run the same command in a non-preview sandbox and compare the output. A test that passes on the current release and fails on the preview points to a release-related change.
Common errors and how to avoid them
- Assuming all sandboxes are on preview. Check each sandbox's release in Setup or on the Trust site. Do not assume.
- Refreshing a sandbox without checking the schedule. The refresh may change which release the sandbox runs.
- Starting testing too late. A preview window of a few weeks goes quickly. If you start in the last week, you may not have time to fix what you find.
- Deploying preview-only changes to production. Keep production-bound work on a non-preview sandbox.
- Tracking one date for many orgs. Look up the instance for every production org.
- Skipping the days after the upgrade. Issues from some changes show up only under real user load.
Putting it together
Treat the timeline as a project schedule with five checkpoints: schedule known, preview testing started, fixes complete, production upgraded, and monitoring finished. The later chapters on regression testing, communication, and the readiness checklist fill in the work at each checkpoint. This chapter gives you the dates and rules that frame that work.
Exercise
Your team has one preview sandbox and one non-preview sandbox. A critical bug needs a fix in production next week, and the preview window is still open. Where should you build the fix, and why?
Show answer
Build it in the non-preview sandbox. That sandbox is on the same release as production, so the fix can deploy to production without release-version conflicts. A fix built in the preview sandbox might use metadata or behavior that production does not support yet, and could fail to deploy.
Exercise
Your company has two production orgs on different instances. A colleague says you only need to track one upgrade date. Is that correct? How would you check each org's date?
Show answer
No. Production upgrades happen in waves by instance, so the two orgs can be upgraded on different weekends. Find each org's instance in Setup under Company Information (the Instance field), then look up that instance in the published release schedule.
Exercise
A test class passes in your non-preview sandbox but fails in your preview sandbox when you run sf apex run test with --test-level RunLocalTests in each. What does this suggest, and what should you do next?
Show answer
It suggests the new release changed behavior that your code or test depends on. Compare the failure details with the release notes and any Release Updates, fix the code or test if the cause is on your side, and open a case with Salesforce if you suspect a platform defect. Do this before your production upgrade weekend.