Sub topic 13
What Change Sets Cannot Do
This chapter assumes you can build an outbound change set, upload it, and deploy the inbound change set in the target org. It covers the limits you will hit once you rely on change sets for real releases. Knowing them early helps you plan a release before it fails halfway through.
Limits on where change sets can go
A change set only moves between orgs that have a deployment connection. Connections exist between a production org and its sandboxes, or between sandboxes that share the same production org. Two unrelated production orgs cannot exchange change sets. A change set also moves in one direction through the connection you authorized, so you must set up the path before you need it.
Metadata types that are not supported
Not every metadata type can be added to a change set. The Add page only lists types the feature supports. If a component you expect is missing, it is probably unsupported. Some settings can only be changed by hand in the target org. Salesforce adds support over time, so check the current list of supported components before you plan a release.
You also cannot add some components on their own. A component that depends on others may need those others added with it. The View/Add Dependencies step helps, but it does not always list everything.
Limits on how you work
Change sets also have limits in how they behave:
- A change set cannot be edited after you upload it. To change the contents, you clone it, edit the clone, and upload again.
- A change set cannot delete components. Removing a field, class, or flow from the target org is a manual step in that org.
- A change set does not carry data. Records such as accounts or custom setting values stay behind.
- A change set has no version history. You cannot compare it with an earlier release or roll it back.
- A change set is not tied to source control, so you have no record of who changed what outside the org itself.
- A change set cannot be scripted, so every release repeats the same clicks.
Rollback and deletions
Deploying a change set overwrites the matching components in the target org. There is no undo button. If a deployment causes a problem, you must fix it by deploying a corrected change set, or by editing the target org by hand. This is why validation matters before every deployment.
The same applies to deletions. If you delete a custom field in the sandbox, the change set will not delete it in production. You remove it there yourself, after checking that nothing depends on it.
Comparing against the target
Change sets give you no built-in diff between orgs. To see what differs, you can retrieve metadata with the Salesforce CLI, using a manifest like the one earlier in this tutorial.
sf project retrieve start --manifest manifest/package.xml --target-org MySandboxRun the same command against production and compare the two sets of files with any diff tool.
Signs you have outgrown change sets
Consider another tool when you see these patterns:
- You deploy often, and the manual steps take longer than the work itself.
- Several people change the same components and overwrite each other.
- You need an audit trail or a rollback plan.
- You need to deploy between orgs that have no deployment connection.
Later chapters cover the alternatives.
Exercise
A developer deletes a custom field in a sandbox and deploys a change set to production. The field is still there afterward. Why, and what should the team do?
Show answer
Change sets cannot delete components. They only add or update them. The team should check that nothing in production depends on the field, then delete it manually in production.
Exercise
Name two reasons a team might move from change sets to a source-based tool.
Show answer
Any two of these: change sets cannot be scripted, they have no version history or rollback, they cannot delete components, they do not support every metadata type, and they work only between connected orgs.