What is a Sandbox?
A sandbox is a copy of a production environment used for a variety of purposes, commonly including testing and development.
Here’s how it works: When you create or refresh (essentially deletes and recreates a sandbox using the same name) a sandbox, a copy of the production environment at that point in time is made. The vast majority of the configuration remains the same as the production org. There are a few tweaks to sandboxes during the copy process – for example the sandbox name (e.g. Dev1) is appended to the username of all users within the sandbox. Some types of sandboxes will allow you to specify data to be copied from production into the sandbox as well (see below). If no data is copied (e.g. developer edition sandbox), then all of the configuration (metadata) will be migrated, but no records will be present.
What’s the goal?
Let’s say that I want to build a new Force.com application – I would start by building and testing that application in a sandbox. Once I am satisfied with the application, I can then migrate the metadata and data (if applicable) to the production environment. By performing this configuration in a non-production environment, I am free to test and experiment without running the risk of creating unused configuration/fields, interfering with an existing application in use, and other such concerns.
Many enterprise companies will use a multi-staged deployment methodology – the most common example is development and unit testing in one sandbox (usually a developer sandbox), promotion to QA (usually a full sandbox), then promotion to production.
Sandbox Overview
[Should / Short / Salesforce.com]
Developing and Testing with Sandbox (Trailhead)
[Should / Long / Salesforce.com]
Sandbox Types
Type | Copies Metadata | Copies Data | Refresh Limit | Data Limit |
---|---|---|---|---|
Developer | Yes | No | Daily | 200MB |
Developer Pro | Yes | No | Daily | 1GB |
Partial Copy | Yes | Partial | 5 Days | 5GB |
Full | Yes | Yes | 29 Days | Same as Production (at time of copy) |
Login URLs
To login to a sandbox, you must use the sandbox URL. Likewise, logging into production requires using the production URL. This applies to login via the website and API alike.
Production: https://login.salesforce.com
Sandbox: https://test.salesforce.com
Migrating Metadata Between Environments
Several tools exist to help an administrator or developer migrate metadata (configuration changes) from one environment to another. The two most-commonly used tools are:
1. Change Sets: native tool, admin-friendly (development experience not required)
Note that the use of change sets requires a production environment with an accompanying sandbox. Developer Edition does not include a sandbox and therefore change sets are not available in DE orgs. You need an Enterprise Edition or higher org to use change sets.
Change Sets Overview
[Could / Short / Salesforce.com]
Salesforce's Change Set Feature
[Could / 22m / Nubik]
2. Force.com IDE: developer toolkit, desktop application (developer-oriented)
Force.com IDE
[Could / Medium / Salesforce.com]
This guide will not cover these tools in any more depth, as this is out of scope for the Salesforce.com Certified Administrator Exam.
Lessons Learned
This guide will not cover sandboxes in depth, as it is not required for ADM201 certification. However, I would like to share a few lessons I’ve learned working extensively with sandboxes throughout the years:
- Your sandbox will get out of sync with your production environment almost immediately. If you make regular configuration changes in your production environment (or in multiple development environments), this is problematic. Plan accordingly; there isn’t an easy solution.
- Test your deployment. Change sets are a great tool, as is the IDE. Both can act in ways you might not expect- create another sandbox and test your deployment from one sandbox to another (assuming you have the sandboxes to do so), especially if you are new to the process. Use the preview deployment feature of change sets to your advantage.
- Promotion of profiles is problematic; change sets are much easier.
- The amount of data in your production org can dramatically increase the time it takes to create a full sandbox (with all data included). In one case, I saw a sandbox take over 5 days to be created (millions of records).
- When you create a full sandbox, the record IDs (accounts, contacts, etc.) will match the production environment (the org id will be different). However, as soon as you create new records in either environment, the new record IDs will not match.
I am going through the review list one by one and just decided to study trailhead in unison with your website. I noticed that trailhead discusses App creation a lot. Is that something that I should be focusing on on my ADM 201?
Yes you should know how to create an app
Hi John ,,
What if i create a custom object and the relevant tab in a sandbox environment but while migrating through change sets , i dont add the tab component . Will the migration fail or only the object will be mgrated without the tab ?
It would migrate with only the object.
If you tried to migrate the tab without the object (and the object did not exist in the target org), then it would fail (as the object would be a dependency).
What are reasons to specify an Apex Class when creating a partial data Sandbox? Do I need one if I’m simply doing base configurations and no development?
Reference: https://releasenotes.docs.salesforce.com/en-us/spring16/release-notes/rn_deployment_sandbox_postcopy_script.htm?edition=&impact=
If you want to do some type of processing in the sandbox after the sandbox is created (e.g. reset the password of all of the testing team, or automatically change existing an existing user to an administrator … e.g. a developer that has read access to prod but needs admin to the dev environment)
As defined in salesforce help, “A Developer Pro Sandbox is intended for development and testing in an isolated environment and can host larger data sets than a Developer Sandbox.”
Your table above shows No Data is copied. But what does hosting larger data sets imply?
It means that you can test with large data sets (up to 1 GB) – the developer will need to populate the data set though… it wont carry over from production automatically
John, under Sandbox types, I think Partial Data is now called Partial Copy? Salesforce help calls it Partial Copy.
Yep – updated, thanks
Hi John,
I am very new to Salesforce and was going through the “Salesforce’s Change Set Feature” video from Nubik. However I don’t see any Deployment options on the left-side bar. Please assist.
The url I am using – https://ap4.salesforce.com/
Regards
Akshay
You can’t use change sets in a developer org- you need a production environment with at least one sandbox
Hi John,
Thanks for the reply.
Can you please assist if I can setup production environment as free of charge.
Regards
Akshay
Yep – developer edition: http://classic.certifiedondemand.com/salesforce-com-certified-administrator/getting-started/create-a-practice-org/
The link to Force.com IDE seems to be broken: http://wiki.developerforce.com/page/Force.com_IDE
Clicking returns the following error:
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie
Looks like it works for me – I was having some strange issues with the Salesforce websites last week. Try clearing your browser cache (or using another browser)
Hi John,
Could you please tell me hoe to activate and work on the sandbox in the developer edition(free SF account).
Thanks in advance
Alas, developer edition does not include sandboxes 🙁
John
Thanks for your help in putting this extensive documentation together. I cleared the test 6/29. There were a lot of questions on communities, chatter, activities, service cloud. For some odd reason, I wasn’t expecting them. Needless to say, its critical that prospective candidates focus on all the topics and corresponding details.
Thanks. Happy 4th.
That’s great, congrats!!
I didn’t really get this part.. .sorry:
If no data is copied (e.g. developer edition sandbox), then all of the configuration (metadata) will be migrated, but no records will be present.
Do you mean, if there is any data copied, not all metadata is migrated? Thanks.
All of the metadata (config, fields) is copied – the data (eg account records) would not be copied in developer sandboxes.
Thank you 🙂
Hi John,
Am preparing for both ADM201 and app builder. Could you please provide the answer for this question. “what happens when new object is promoted with profile from sandbox to prod with change set but respective tab is not included. In this case whether tab will be visible, hidden or turned off for all users?” Thank you.
If the tab wasn’t included in the change set then there would be no tab at all- e.g. no place to select “hidden”… there’s no tab to hide.
This is perhaps not quite the right place to ask… but I will anyways 😉
It appears the 401 certification is now or will soon be defunct, and has been replaced by a combination of others :
Platform App Builder (declarative only/ replacement for 401?)
Platform Developer 1 (programming)
Platform Develop 2 (programming)
(There is still alot of material out there talking about 201 and 401, and this confused me as the SF certification “curriculum” seems to have changed fairly recently. Hopefully this will save others some time/confusion.)
Is that your understanding as well John, re: the 3 certs above, as they are related to the Admin certification? Would be nice of SF published and “old” vs “new” map 😉
Good Q (and quite common)-
App Builder is definitely the closest to ADM201- I’ve taken the migration exam from 401 to App Builder myself (as I am not a programmer, thus Dev 1 is not appropriate).
Old to New:
401 –> App Builder
(No old offering that matches) –> Dev 1
501 –> Dev 2
Salesforce is moving away from the “developer” term NOT involving code… which I applaud. It confused a lot of folks 🙂
Hi John,
Could you please explain what you meant here: “Promotion of profiles is problematic; change sets are much easier.” – I did not understand it.
Thank you,
Gil
If you are moving permissions (e.g. profile or permission sets) from one org to another (e.g. from a sandbox to production), permission sets are a bit easier to work with as they are more self contained (a profile touches much more of the system and will not always deploy exactly as you intended- requires manual verification). For example I once deployed a profile and it did not override any of the settings contained within the profile (this had to be done by hand).
Hi John,
Your article and material are very well articulated! Thank you this website!
Hi John,
Can you elaborate what you mean by “Promotion of profiles is problematic; change sets are much easier” ? I followed pretty well up until this point.
Thanks!
Clarissa
This is not important for the admin exam – but basically it is easier to package and promote (move from one environment to another) a change set because change sets have a limited impact (e.g. only a subset of permissions).
When you package a profile into a permission set it only changes the profile in the context of the other components that are packaged in that same change set (e.g. you include the ‘sales person’ profile and the ‘commission’ field, then profile would only be changed for the ‘commission’ field). This can lead to packaging components you wouldn’t want to include (such as a field that already exists).
Tabular column says Developer edition can only copy metadata in sandbox. But I believe for developer edition sandbox is not available right. Am I missing something?
Developer edition is a production account – one that you signed up for at the beginning of this guide. There are no sandboxes in a DE org, correct.
There are also “developer” sandboxes which are available through Enterprise Edition and up.
Hi John
The videos made sense after having read the material on Sandboxes albeit Nubik’s went thru his material too fast.
Thanks
Sanjay
Great section on Sandboxes! As I am not a full Administrator for my company I had always wondered how they worked. Articles & video has given me a much better understanding how it works. Thank you.
Hi John,
i am trying to login into the test.salesforce.com site, using developer site credentials but it’s erroring out . Am i doing it wrong ?
A developer edition org is a production org, you can use https://login.salesforce.com to login
@John you should really start an online tutorial site for multiple technologies. your content is really strong and well articulated.
Thanks!
John, I need help understanding this statement. I have been using the data loader and doing testing of data loader with my sandbox. Can you explain why the Record ID’s change? How and when with an example would be beneficial. Thank you!
***When you create a full sandbox, the record IDs (accounts, contacts, etc.) will match the production environment (the org id will be different). However, as soon as you create new records in either environment, the new record IDs will not match.
The record ID is established when the record is created in the org. Therefore if you are creating a record in one org (sandbox) and another org (production) at the same time, the IDs are not likely going to match.
However, when a full sandbox is created, it can retain a copy of some or all records from the production environment. In this case, the IDs of the records are the same (because the sandbox is inheriting the records from production) – however, this is realistically the only time where this is likely to occur.
After the copy has completed, if you were to create records in the sandbox and in production, the IDs again would not match.
Does that help?
Very helpful! Thank you that makes sense.
John,
I created a test org from my partner account then created a sandbox from the test org to test the change set function. The related video on this page was helpful.
Frank
Grammar catch – …am free to test and experiment without running the risk of created/creating unused configuration/fields…
Should be creating instead of created in the above…
Thank you, updated
Hi John,
Do you offer similar study guide for DEV401 certification?
Not yet… may soon. Stay tuned.
Also note that there is a 50%+ overlap between the DEV401 and ADM201 – this guide should help significantly for DEV as well.
What does daily developer sandbox refresh mean?
It means that you can refresh the sandbox once per day. With a some sandboxes you are prevented from frequent refreshes.
John –
I have a follow up question then – why would a Full Sandbox not allow the refresh until the cycle of 29 Days is completed? I am not sure I follow.
That’s a limitation from Salesforce. For high volume orgs a full sandbox refresh can take over 24 hours and is quite resource intensive. Therefore you can’t refresh full sandboxes more than once per 30 days.
In the lesson learned section ADM 201 certification is mentioned but this is study guide for dev 401 certification. Is my understanding correct?
This study guide is for ADM201 certification, however, there is significant overlap between the content for DEV401 and ADM201.
According to Salesforce.com site:
“Developer sandboxes are limited to 200 MB of test or sample data, which is enough for many development and testing tasks.”
But In the Table it is mentioned: 10 MB.
Please correct me If I am wrong
Thanks,
Sai
Correct, and updated. Thanks!
I believe this needs updating or clarification => “I would start by building and testing that application in one or more sandboxes ‘before migrating the implementing the application’ in production.
Thanks for the feedback Michael – I’ve updated and added some context.
Hello John,
Thanks for the nice content 🙂
As I am kind a new to Sales force and preparing for my first Admin certification.
I am trying to check the change sets features but Not getting the Sandbox option (Developer Edition-Free 14 release) in the Setup ? I did try to login with test.Salesforce.com for the same also not getting through with my same user name and password.
Let me know where I am going wrong or did I miss something?
Thank-you
Varun
Hi Varun,
As a developer edition does not have a sandbox, change sets are not available. You would need an Enterprise or above org. Good question! Thanks,
John
Configuration Only is now called Developer Pro as of the Winter ’14 release.
Updated, thanks!