Sub topic 3
Which orgs can exchange change sets
This chapter assumes you can work in Setup and know the difference between a production org and a sandbox. It also assumes you know what metadata is. You will learn which orgs can send change sets to which, and how to check your own org's options before you build anything.
The rule: orgs must be related
Change sets only move between orgs that are related. Two orgs are related when they share a production org. A sandbox is created from a production org, so the two are related from the start. Two sandboxes created from the same production org are also related.
Change sets do not work between unrelated orgs. A sandbox from one company's production org cannot send a change set to another company's org. The same applies to two separate production orgs, and to a developer edition org that has no link to your production org.
Common deployment paths
A change set can only travel along a path that the target org allows. The most common paths are listed below.
| From | To | Allowed |
|---|---|---|
| Sandbox | Production org it was copied from | Yes |
| Production org | Sandbox copied from it | Yes |
| Sandbox | Another sandbox from the same production org | Yes |
| Sandbox | Production org of a different company | No |
| Production org | A separate, unrelated production org | No |
Most teams use a chain of sandboxes. For example, developers work in a Developer sandbox. They send changes to a Partial Copy sandbox for testing, and then to production.
Direction matters
A change set has a direction. The org that builds it holds an outbound change set. The org that receives it holds an inbound change set. The connection between two orgs is configured on the receiving side, and it controls who is allowed to send.
Because of this, you may be able to send from sandbox A to sandbox B but not the other way until B also authorizes A. The next chapter covers how to set that up.
Check which orgs your org can reach
You can see the connections an org has from Setup.
- In the Quick Find box, enter Deployment Settings and open the page.
- Read the list of connected orgs. Each entry shows the org name and whether it is authorized to send to this org.
- Select Edit next to an org to change whether it may send change sets to this one.
Production orgs and sandboxes appear in the list automatically, once they are related. If an org you expect is missing, it is probably not related to this one, or it has not been created yet.
Common mistakes
- Expecting to deploy between unrelated orgs. If the two orgs do not share a production org, change sets cannot connect them. Use another tool, covered near the end of this tutorial.
- Building in the wrong org. An outbound change set is created in the source org. If you are in the target org, you will only see inbound change sets.
- Forgetting that authorization is one-way. Allowing a sandbox to send to production does not allow production to send to that sandbox.
Exercise
Your company has a production org and two sandboxes, both created from it. A consultant has a sandbox created from a different company's production org. Which of these can exchange change sets with your first sandbox: your second sandbox, your production org, the consultant's sandbox?
Show answer
Your second sandbox and your production org can, because they share the same production org and are related to your first sandbox. The consultant's sandbox cannot, because it belongs to a different production org and is unrelated.