Sub topic 7
Uploading the change set
This chapter covers the step between building an outbound change set and reviewing it in the target org. You'll look at what the Upload action does, what it needs, what gets locked, and how to check the contents before you send them.
It assumes you can already create an outbound change set, add components, and view dependencies. It also assumes the deployment connection between the two orgs is authorized. Hands-on practice needs a sandbox and its production org.
What an upload does
An outbound change set is only a list of components stored in the source org. Nothing has moved yet. Uploading copies a snapshot of that list, along with the current metadata for each component, to the target org. There it shows up as an inbound change set.
Three points follow from this:
- The target org receives the metadata as it was at upload time. Later edits in the source org are not sent.
- Uploading does not deploy anything. The target org's configuration stays unchanged until someone deploys the inbound change set.
- Uploading never moves data. Records stay where they are, as covered in the first chapter.
Before you click Upload
Check three things first.
Permissions
To upload, your user needs the Upload External Change Sets permission in the source org. It is separate from Deploy Change Sets, which you need in the target org to validate and deploy. In many companies one person builds and uploads in the sandbox, and a different person deploys to production. The two permissions make that split possible.
The deployment connection
The upload screen lists only the orgs that have an authorized connection with the source org. If your target is missing, the cause is almost always the connection.
- A sandbox can send to its production org by default, and to other sandboxes of that production org.
- A production org accepts inbound change sets only after an admin allows them under Deployment Settings.
- The connection must be authorized in the direction you need. Check Deployment Settings in the target org.
Fix this before anything else. Re-creating the change set won't change which orgs the list shows.
The contents
An upload is hard to take back, so inspect the change set while it is still editable:
- Open the change set and review the Change Set Components list.
- Click View/Add Dependencies and add anything the platform suggests that the target org lacks.
- Fill in the Description field. It travels with the change set and is the first thing the deployer sees in the target org.
Names matter too. Use one that carries meaning, such as 2026-11 Invoice object and service. The target org lists inbound change sets by name, and "Changes 2" tells nobody anything.
Comparing the change set with the sandbox
The change set page shows only a list of components. It doesn't show their contents. A manifest-based retrieve is a way to see what the sandbox holds for those components right now. The retrieve and the upload read the same org, so what you retrieve is close to what the upload will send.
A package.xml manifest names metadata by type and member. A change set holds the same kind of list.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Invoice__c</members>
<name>CustomObject</name>
</types>
<types>
<members>InvoiceService</members>
<members>InvoiceServiceTest</members>
<name>ApexClass</name>
</types>
<version>61.0</version>
</Package>Retrieve those components from the sandbox with the Salesforce CLI:
sf project retrieve start --manifest manifest/package.xml --target-org MySandboxCompare the retrieved files with what you expect. For example, you can find out whether Invoice__c still has a field you meant to drop. Doing this before the upload is cheaper than finding out during validation in production.
The retrieve changes nothing in the org. It only writes files into your local project.
Running the upload
- In the source org, open Setup and search for Outbound Change Sets.
- Open the change set you want to send.
- Click Upload.
- Select the target org from the list.
- Click Upload again to confirm.
The change set's status changes to Uploading. When the transfer finishes, the status changes to Uploaded, and the person who started it gets an email notification. Large change sets take longer. Don't click Upload again while the status shows Uploading, because a second attempt can't help and may cause confusion.
What gets locked
After the upload starts, you can't edit the change set. You can't add components, remove components, or change dependencies. This keeps the inbound copy and the outbound record identical, so the deployer in the target org can trust that what they validated is what you sent.
To change anything, clone the change set:
- Open the uploaded change set.
- Click Clone.
- Edit the clone, which is open for changes.
- Upload the clone.
The old inbound change set stays in the target org until someone removes it. When you send a corrected version, give it a different name and say in the description that it replaces the earlier one. Otherwise the deployer may deploy the wrong one.
Size and count limits
An upload is rejected if the change set is too large. The commonly documented limits are 10,000 files and 400 MB per change set. Check the current Salesforce documentation, since limits change between releases. If you hit the limit, split the work into several change sets. Remember that components in a later change set may depend on components in an earlier one, so deploy them in order.
Common upload problems
| Symptom | Likely cause | What to do |
|---|---|---|
| Target org is not in the list | No authorized connection in that direction | Allow inbound changes in the target org's Deployment Settings |
| Upload button is missing or disabled | You lack Upload External Change Sets, or the change set is empty | Ask an admin for the permission, or add components |
| Status stays at Uploading for a long time | Large change set or a busy period | Wait, then check the list again before retrying |
| Inbound change set not visible in the target org | Upload has not finished, or you are looking in the wrong org | Confirm the status says Uploaded and open the target org's Inbound Change Sets page |
| The target is missing a recent edit | You edited after uploading | Clone the change set and upload the clone |
Uploading to more than one org
A change set can be uploaded to more than one target, for example to a UAT sandbox first and then to production. Each upload sends its own snapshot of the components as they exist at that moment. If the sandbox changes between the two uploads, the two targets can receive different versions under the same change set name. For a production release, upload a fresh clone and treat it as a new release rather than reusing an old upload.
What happens next
After a successful upload, the work moves to the target org. The deployer opens the inbound change set, reviews its components, validates it, and then deploys. The next chapter covers that review.
Exercise
You uploaded a change set, then noticed a typo in a validation rule error message that you had already fixed in the sandbox after uploading. Can you edit the uploaded change set to include the fix? What should you do?
Show answer
No. An uploaded change set is locked, and it holds a snapshot of the components from upload time, so it still has the typo. Clone the change set, upload the clone with a distinct name, and note in the description that it replaces the earlier one. Then deploy the new inbound change set and ignore the old one.
Exercise
A colleague in a sandbox cannot see your production org in the Upload target list. Give the most likely cause and the place where you would fix it.
Show answer
There is no authorized deployment connection that lets production receive from that sandbox. A production admin fixes it in the target org's Deployment Settings by allowing inbound changes from the sandbox. Re-creating the change set does not help.
Exercise
Why might you run sf project retrieve start --manifest manifest/package.xml --target-org MySandbox before uploading?
Show answer
It retrieves the components named in the manifest as they currently exist in the sandbox. You can inspect the files and confirm they hold the changes you intend to send, without changing the org. It catches missing or unwanted changes while the change set is still editable.