Sub topic 2
Developer Edition, Trailhead Playgrounds, sandboxes and scratch orgs
This chapter assumes you know what a Salesforce org is: one isolated instance of Salesforce with its own data, configuration and users. It also assumes you have a general idea of what a CRM is. You do not need to run any commands yet. The goal is to help you pick the right kind of org before you fill in the sign-up form in the next chapter.
Why there are several org types
Salesforce sells production orgs to customers. Developers and learners need places to build and test that do not touch real customer data. Four kinds of non-production org cover most needs. They differ in who owns them, how long they last, and where their data comes from.
The four org types
Developer Edition
A Developer Edition org is a free, standalone org that you sign up for yourself. It has most platform features, a small data and file storage allowance, and a limited number of user licenses. It is not a copy of any other org. It stays available as long as you log in regularly, which makes it a good long-lived place for personal projects, experiments and exam practice.
Trailhead Playground
A Trailhead Playground is an org linked to your Trailhead account. You use it to complete hands-on challenges in Trailhead modules. Some Playgrounds are tied to a specific trail and can be reset or replaced. Treat a Playground as a learning tool. Do not keep work there that you cannot afford to lose.
Sandbox
A sandbox is a copy of a production org. It is created from a production org, so you need access to one. Depending on the sandbox type, it can contain only metadata (configuration and code) or metadata plus some or all of the production data. Teams use sandboxes for development, testing and training before changes go live. You cannot create one from a Developer Edition org.
Scratch org
A scratch org is a short-lived org that you create from the command line using a definition file. It is built from source code, so you can create and delete one quickly. It lasts from 1 to 30 days, and 7 days is the default. Scratch orgs are meant for source-driven development and automated tests. You create them from a Dev Hub org, which can be a Developer Edition org. That is why a later chapter covers enabling Dev Hub.
Comparing them
| Type | Cost | Created from | Lifespan | Typical use |
|---|---|---|---|---|
| Developer Edition | Free | Sign-up form | Long-lived while active | Personal projects, exploration |
| Trailhead Playground | Free | Trailhead account | Long-lived, can be reset | Trailhead challenges |
| Sandbox | Part of a production license | A production org | Refreshable copy | Team testing and staging |
| Scratch org | Free with a Dev Hub | Dev Hub and a definition file | 1 to 30 days | Automated, source-driven work |
Choosing between them
Ask these questions in order:
- Are you completing a Trailhead module? Use the Playground the module offers.
- Do you need a copy of a real company's setup or data? That requires a sandbox from that company's production org.
- Do you want disposable orgs built from source code, for example in a CI pipeline? Use scratch orgs, which need a Dev Hub.
- Do you want your own free org that you control and that does not expire after a short time? Use Developer Edition.
For this tutorial, Developer Edition is the right choice. It gives you a permanent home for practice and, later, the Dev Hub that scratch orgs depend on.
Common mistakes
- Expecting a Developer Edition org to hold production-scale data. Its storage is small.
- Storing important work in a Trailhead Playground and losing it when the Playground is reset or expires.
- Trying to create a sandbox from a Developer Edition org. Sandboxes come from production orgs.
- Forgetting that scratch orgs are deleted when they expire, so source code must live in version control, not only in the org.
Exercise
You want a free org for personal practice that stays available for months, and you also want to create short-lived test orgs from the command line later. Which org type do you sign up for, and what must you enable on it?
Show answer
Sign up for a Developer Edition org. Later, enable Dev Hub on it so you can create scratch orgs from the command line.
Exercise
Why can you not make a sandbox from a Developer Edition org?
Show answer
A sandbox is a copy of a production org. A Developer Edition org is a standalone org, not a production org, so it has nothing to copy.