Sub topic 8
Reviewing the inbound change set in the target org
This chapter assumes you know the difference between a production org and a sandbox. It also assumes you can navigate Setup and have uploaded an outbound change set. Here you switch to the target org and look at what arrived.
What an inbound change set is
An inbound change set is the copy of an uploaded outbound change set that appears in the target org. You don't build it or edit it there. You can only review, validate, deploy, or delete it.
To find it, log in to the target org and go to Setup. Search for Inbound Change Sets in Quick Find. The page has two lists:
- Change Sets Awaiting Deployment holds change sets that were uploaded and haven't been deployed.
- Deployment Status shows deployments that are in progress, succeeded, or failed.
If the change set is missing, the usual cause is a missing deployment connection. Check that the source org is authorized to send to this org. Also check that the upload actually finished. Large change sets can take a few minutes to appear.
Reviewing the contents
Click the change set name to open its detail page. It shows the description, the source org, the upload date, and the list of components. The component list is grouped by type, such as Custom Object, Apex Class, and Flow.
Check the list against what you expect before you validate. The review answers three questions:
- Are all the components you intended to send here?
- Is anything here that you did not intend to send?
- Does the list include every component the change depends on?
The detail page has a View/Add Dependencies button on the outbound side only. In the target org, you can't add anything. If a component is missing, go back to the source org, clone the change set, add the component, and upload again.
How the review fits the flow
The diagram below shows where the review sits between upload and deployment.
Comparing with a manifest
The component list is similar to a package.xml manifest, which lists metadata by type and name. This is useful when you want to compare the change set to what exists in the sandbox.
<?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>You can retrieve the same components from the sandbox with the Salesforce CLI and compare them with the change set contents.
sf project retrieve start --manifest manifest/package.xml --target-org MySandboxThis step is optional. It helps when a change set is large and the component list is hard to check by eye.
Common mistakes
- Reviewing only names. A component with the right name can still be an old version. Check the upload date and ask the sender when it was last built.
- Skipping the Apex tests. If the change set contains Apex classes, note whether it also includes their test classes. Production deployments need passing tests, and missing tests are a common cause of failed validation.
- Assuming the target has the same setup. The target org might lack a feature, a record type, or a permission the change set depends on. Components that depend on missing items fail during validation.
Next step
When the component list matches your expectations, validate the change set. Validation runs the deployment checks without saving any changes, so you can find problems before they affect users. The next chapter covers it.
Exercise
You open an inbound change set and find that a custom field is listed, but the custom object that owns the field is not. Where do you fix this, and what do you do?
Show answer
Fix it in the source org, because inbound change sets can't be edited. Clone the change set, add the missing custom object (the View/Add Dependencies button can find it), and upload the new version to the target org. Then review the new inbound change set.