Sub topic 4
Developer and Developer Pro sandboxes
This chapter assumes you know how to navigate Setup and can tell metadata (configuration and code) from data (records). You should also know that a sandbox is a copy of a production org used outside the live business. The chapter covers what the two smallest sandbox types contain, how they differ, and where each one fits.
What a Developer sandbox contains
A Developer sandbox copies your production org's metadata and none of its record data. After creation you get:
- Custom objects and fields
- Apex classes and triggers
- Flows, page layouts, profiles, and permission sets
- Reports and dashboards definitions
- Other configuration, such as validation rules
Your Accounts, Contacts, Opportunities, and Cases are not copied. The org starts with empty standard and custom objects, apart from a few records Salesforce creates itself.
This makes the sandbox quick to create. It also keeps customer data out of the environment, which is useful when developers should not see production records.
Developer Pro uses the same copy model: metadata only, no record data. The only difference is the storage allowance.
Developer versus Developer Pro
| Property | Developer | Developer Pro |
|---|---|---|
| Data copied from production | None (metadata only) | None (metadata only) |
| Data storage | 200 MB | 1 GB |
| File storage | 200 MB | 1 GB |
| Refresh interval | 1 day | 1 day |
| Sandbox templates | Not used | Not used |
| Typical use | Individual developer work, small admin changes | QA, training, larger test data sets |
The storage numbers apply to the sandbox, not to production. Sandbox storage does not count against your production limits.
How many of each type you can create depends on your Salesforce edition and any extra licenses you bought. Check Setup, then Sandboxes, to see your own allocation. The page shows how many sandboxes of each type you have used and have available.
Sandbox templates are for Partial Copy and Full sandboxes. They choose which objects' data is copied. A Developer or Developer Pro sandbox copies no data, so there is nothing for a template to select.
The 1-day refresh interval
You can refresh a Developer or Developer Pro sandbox once per day. This is the shortest interval of any sandbox type. A refresh replaces the sandbox with a fresh copy of production metadata. The interval counts from when the previous copy was created or refreshed.
The short interval fits how developers work. If a sandbox falls out of sync with production, or someone breaks it, you can reset it the next day. The cost is that anything not saved elsewhere is lost on refresh, so the work has to live in version control or in a changeset or deployment you can replay. Later chapters cover refresh preparation in detail.
Working within storage limits
Storage is where these two types differ in practice. A 200 MB data limit holds roughly 100,000 records. That is a rough rule, because Salesforce counts most records as about 2 KB each, and some records take more.
Large test data loads, such as a bulk import of 500,000 rows, will fail in a Developer sandbox. When the limit is reached, DML (insert, update) operations fail with a STORAGE_LIMIT_EXCEEDED error.
You can check usage from Apex with the OrgLimits class:
Map<String, System.OrgLimit> limitsMap = OrgLimits.getMap();
System.OrgLimit dataLimit = limitsMap.get('DataStorageMB');
System.OrgLimit fileLimit = limitsMap.get('FileStorageMB');
System.debug('Data storage used (MB): ' + dataLimit.getValue()
+ ' of ' + dataLimit.getLimit());
System.debug('File storage used (MB): ' + fileLimit.getValue()
+ ' of ' + fileLimit.getLimit());Run this in the Developer Console's Execute Anonymous window, then open the debug log. The same numbers appear under Setup, Storage Usage.
Since the sandbox starts empty, you must create your own test data. A small seed script is better than a large import. This one creates 50 accounts, each with two contacts:
List<Account> accounts = new List<Account>();
for (Integer i = 0; i < 50; i++) {
accounts.add(new Account(Name = 'Test Account ' + i));
}
insert accounts;
List<Contact> contacts = new List<Contact>();
for (Account acc : accounts) {
for (Integer j = 1; j <= 2; j++) {
contacts.add(new Contact(
AccountId = acc.Id,
FirstName = 'Test',
LastName = 'Contact ' + j
));
}
}
insert contacts;Keep a script like this in your repository so you can rerun it after every refresh.
Choosing between the two
Use Developer when one person is building or testing a change in isolation, the data needs are small, and a daily reset is acceptable.
Choose Developer Pro when you need more room for test data. Examples include:
- A QA team that loads a few hundred thousand records to run through scenarios
- A training org where many users create practice records
- A project with many file attachments
If you need production-like data volumes or production records, neither type fits. Partial Copy and Full sandboxes copy real data and are covered in the next chapter.
Creating one from the command line
You choose the type with the licenseType field in the sandbox definition file. Developer Pro uses the value Developer_Pro. Valid values are Developer, Developer_Pro, Partial, and Full.
{
"sandboxName": "qa1",
"licenseType": "Developer_Pro"
}sf org create sandbox --definition-file config/sandbox-def.json --alias qa1 --target-org prodThe command runs against the production org authorized as prod. Metadata-only sandboxes usually finish sooner than data-heavy ones, because there are no records to copy.
Common mistakes
- Expecting data. New users often open a fresh Developer sandbox and find no records. This is correct behavior, not a failed copy.
- Loading too much data. A bulk load that works in Developer Pro can fail in Developer. Estimate the volume before you pick the type.
- Treating the sandbox as the source of truth. A refresh removes anything that exists only in the sandbox. Keep your changes in source control.
- Forgetting file storage. Attachments, Salesforce Files, and documents use the file allowance, which is separate from data storage.
Summary
Developer and Developer Pro sandboxes both copy metadata only and can be refreshed daily. Developer Pro offers 1 GB of data and file storage, against 200 MB for Developer. Pick Developer for isolated individual work and Developer Pro when you need more test data or files. Pick a Partial Copy or Full sandbox when you need real production records.
Exercise
A QA team plans to load about 400 MB of generated test records into a sandbox. They do not need any production data. Which sandbox type fits, and what happens if they use the other metadata-only type?
Show answer
Developer Pro fits, because its 1 GB data limit holds 400 MB. A Developer sandbox has a 200 MB limit, so the load would fail with a STORAGELIMITEXCEEDED error once storage fills.
Exercise
A developer refreshed a Developer sandbox this morning and now wants to refresh it again after lunch. Can they, and what should they have done before the first refresh?
Show answer
No. The refresh interval is 1 day, so they must wait until a day has passed since the sandbox was created or last refreshed. Before the first refresh they should have saved all work outside the sandbox, such as in version control, because a refresh replaces the sandbox's contents.