You may have heard the term “sandbox” used from time to time while using Salesforce. A sandbox is simply a copy of your database you can use to test new ideas.
Oftentimes, when you work with a consultant on new functionality for your database they will build and demonstrate it for you in a sandbox before it becomes part of your actual database. However, there are different types of sandboxes and not all of them are the same.
As part of your Power of Us Enterprise Edition of Salesforce you get for free six Developer sandboxes and one Developer Pro sandbox. The only difference between the two is that the Pro sandbox holds more data. Otherwise they are the same and the standard Developer sandbox is usually all you need.
There are also Full and Partial sandboxes which not only include your database configuration but also some or all of the actual data.
To summarize, all sandboxes include a full copy of your code and configuration but not necessarily your data. Here’s a quick comparison of all the types:
- Developer - Does not copy your records but can store up to 200 MB of test records.
- Developer Pro - Does not copy your records, but can store up to 1 GB of test records.
- Partial - Includes a sampling of your actual data.
- Full - Includes all of your actual data.
You can read more about the differences between the various types of sandboxes.
Which Sandbox Should I Use?
If you want to be able to test a new configuration AND have real data in there, you have to manually add it or purchase a paid sandbox (Full or Partial). You need to decide if all you need is a handful of records (which you could easily add yourself) or ALL the records in your live database.
In general, unless you have a specific or special need for having all your actual data in a sandbox, you can just use the Developer sandbox for all your testing.
How Do I Set up a Sandbox?
To login to the sandbox, you can use the Login link right next to the sandbox name or go here.
Now login like you normally would except you must now include the name of your sandbox at the end of your username like this: email@example.com
Your password will be the same.
Keeping Your Sandbox Fresh
In order to refresh a sandbox, go to “Setup,” search for Sandboxes, find the name of your sandbox, and click the Refresh link next to it. Once you initiate a “Refresh” it can take several minutes or even several hours to complete. After the refresh is complete you must then “Active” the sandbox which can also take several minutes.
Remember, when you refresh a sandbox you are erasing and replacing whatever was in that sandbox with whatever is in your production database at the time!
Read this article for more information and considerations on setting up and refreshing sandboxes.
Moving Changes from a Sandbox to Production
A Change Set is a package of new items like fields, objects, Apex code, Visualforce pages, and other things. You can have as few or as many items in a Change Set as you might need. In the Sandbox you would create what’s called an Outbound Change Set into which you put all your new configuration. You then upload your Change Set to the production instance and then from there you deploy the changes as an Inbound Change Set.
There are a few steps you need to go through first, including creating the initial connection between your sandbox and your production instance. However, once you have things figured out, it’s quite easy to move configuration in bulk from the sandbox.
Typical Salesforce development cycle:
For more information on Change Sets, refer to this article.