Sub topic 5
Creating an outbound change set
An outbound change set is the package you build in the source org, usually a sandbox. This chapter covers how to create one, what to put in it, and the mistakes that cause trouble later.
This chapter assumes you know basic Setup navigation, the difference between a production org and a sandbox, and common metadata types such as custom objects, fields, flows and Apex classes. You also need the Deploy Change Sets permission in the source org. The previous chapters covered which orgs can exchange change sets and how to authorize a deployment connection. Both must be in place before you start.
What you are building
An outbound change set is a named list of components. It holds references to metadata in the source org, not the metadata itself. When you upload it, Salesforce reads the current definition of each listed component and sends a copy to the target org.
Two consequences follow from this:
- You can edit a component after adding it to the change set. The upload picks up the version that exists at upload time.
- Once uploaded, a change set is locked. You cannot add or remove components. To change the contents, clone it and edit the clone.
Before you start
Check these items first. They prevent most rework.
- Confirm you are logged in to the source org, not production.
- Confirm a deployment connection to the target org exists under Setup > Deployment Settings. Sandboxes in the same production family have one by default. The target org must also allow inbound changes.
- Decide what the package will contain. A small, focused change set is easier to validate and to troubleshoot than a large one.
- Write down the component names. A manifest-style list helps, because a change set holds the same kind of information as a
package.xmlfile.
Here is a package.xml manifest that lists one custom object and two Apex classes:
<?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>A change set with the same contents would list Invoice__c under Custom Object, and InvoiceService and InvoiceServiceTest under Apex Class. If you have the Salesforce CLI, you can retrieve those components from the sandbox and compare them with what you plan to deploy:
sf project retrieve start --manifest manifest/package.xml --target-org MySandboxThis step is optional. It is useful when you want a local copy of the source to review before you build the change set.
Create the change set
- In the source org, open Setup and search for Outbound Change Sets in the Quick Find box.
- If a welcome page appears, click Continue.
- In the Change Sets list, click New.
- Enter a Name. Use a name that states the purpose, for example
Invoice_Object_2026-11. Names show up in the target org, so avoid vague ones likeTest1. - Enter a Description. Mention the ticket or release, and what the package does.
- Click Save.
The new change set opens on its detail page. It has no components yet. The page has two main sections, Change Set Components and Change Set Detail, plus buttons for adding components and for upload.
Add components
Click Add in the Change Set Components section. Choose a Component Type from the list, such as Custom Object, Apex Class or Flow Definition. Salesforce lists the components of that type in the org. Select the ones you want and click Add To Change Set.
Repeat for each component type. The components you add appear on the detail page, grouped by type.
Choosing the right component type
Some names in the list are not obvious. These are the ones that cause the most confusion.
| What you want to move | Component type to pick |
|---|---|
| A custom object and its fields | Custom Object |
| A custom field on a standard object such as Account | Custom Field |
| A flow | Flow Definition |
| A page layout | Page Layout |
| A profile or permission set | Profile or Permission Set |
| An Apex class or trigger | Apex Class, Apex Trigger |
Adding a custom object adds the object and its custom fields. Adding a field to a standard object requires you to add the field on its own.
Use View/Add Dependencies
After adding components, click View/Add Dependencies. Salesforce scans the change set and lists components that the selected ones rely on but that are not included. For example, a flow may reference a custom field, or an Apex class may call another class.
Select the missing items and click Add To Change Set. The next chapter covers dependencies in detail. For now, always run this check before you upload.
Profiles and permission sets
Profiles need special care. When you add a profile to a change set, only the settings for the other components in the same change set are deployed. Permissions for components that are not in the package are not sent. Permission sets work in a similar way, and they are generally safer, because they are additive and do not overwrite other settings.
A common pattern is to grant access through a permission set rather than through a profile. Add the permission set to the change set after you add the objects and fields it refers to.
Review the change set
Before you upload, review the contents on the detail page.
- Check that every type and name matches your list.
- Check that required Apex tests are included if the target is production, where tests run on deployment.
- Check for components that you added by accident.
- Check the Change Set Detail section. The description should still describe the contents accurately.
If something is wrong, select it and click Remove, or add the missing item. You can only do this before upload.
Upload
Click Upload. Select the target org from the list and click Upload again. The status shows as Uploading and then changes when the upload finishes. You also receive an email.
The change set then appears in the target org under Inbound Change Sets. The upload can take a few minutes. Salesforce can take longer to make a large change set available, so wait before assuming that something is wrong. The next chapters cover the upload step and the target org steps in more detail.
Cloning and versioning
Because uploaded change sets are locked, changes mean a new change set. Use the Clone button on the detail page. Cloning copies the component list, not the upload history. Give the clone a new name, such as Invoice_Object_2026-11_v2.
You can upload the same change set to more than one target org. This is useful for a path such as a developer sandbox to a testing sandbox, and then a staging sandbox. Each upload creates its own inbound change set in the target.
Common mistakes
- Missing a field on a standard object. The object is not in the change set, so you must add each field on its own.
- Adding a profile and expecting full parity. The profile carries only settings for the included components.
- Forgetting test classes. A production deployment that includes Apex needs test coverage, and the tests must be in the target org.
- Editing the source after upload. The target has the old copy. Clone and re-upload.
- Using unclear names. A target org administrator may not know what
Test1is.
Summary
An outbound change set is a locked, named list of component references that you build in the source org and upload to a connected target. Give it a clear name, add components by type, run View/Add Dependencies, review the list, and upload. If anything needs to change after upload, clone it.
Exercise
You uploaded a change set and then noticed that a custom field was missing. You added the field to the change set on its detail page, but the Add button does not appear. What is the cause, and what do you do next?
Show answer
An uploaded change set is locked, so you cannot add components to it. Clone the change set, add the missing field to the clone, run View/Add Dependencies, review it, and upload the clone under a new name.
Exercise
You add a profile to a change set that contains one new custom object. Will the profile's settings for other objects in the org be deployed? Why does this matter?
Show answer
No. Only the profile settings for components in the same change set are deployed. This means you cannot use a profile in a change set to copy all of a profile's permissions to the target. For additive access, a permission set is often a safer choice.