Using Branch PreDeploy Fix
PreDeploy Fix proactively detects and resolves missing dependencies before deployment.
Written for the Old UI
This article was written for the old UI. The instructions are still usable, but the screenshots are outdated. In some cases, items referenced in the instructions have moved or changed. If you cannot find an item, see the Where Did It Go article.
Overview
The PreDeploy Fix is a validation process that inspects your branch for potential issues before deployment, such as:
API version mismatches
Missing components
Broken references
Unmet dependencies
If issues are detected, they are listed with options for resolution. This process helps prevent deployment failures by:
Checking and updating component API versions
Retrieving missing metadata
Removing or updating references to problematic components
By addressing these aspects, your deployment becomes cleaner and less error-prone.
Best Practices
Always run a PreDeploy Fix before Validate or Deploy to reduce the chance of failures.
For Missing Dependencies, use Retrieve when possible to ensure all dependencies are correctly included. Use Remove only when you’re sure the reference is obsolete or not needed.
Enter clear and descriptive commit messages. These will show in the Commits tab for future tracking.
Rerun PreDeploy Fix after resolving issues until the lists are empty.
Use filters (status, type, date range) in Activities to quickly track your PreDeploy Fix jobs.
Review logs whenever a job ends with Exception or Action Required to understand what needs fixing.
Run Branch PreDeploy Fix
PreDeploy Fix Results
API Version Errors
If the PreDeploy Fix detects any API version errors, they will appear in the API Version Errors table. This table shows each component with an API version error. To the right of each component are two API versions: the Component API version and the Organization API version. The Component API version is the one the component uses in the branch, and the Organization API version is the one it uses in the Salesforce org used as the connection for this PreDeploy Fix.
Click the API version errors tab.

Missing Dependencies
If the PreDeploy Fix identifies any missing dependencies, they will be shown in the Missing Components table. This table displays each missing metadata dependency along with the component that references it. To fix missing components, you can choose from two options and apply them to each component as needed.
Retrieve: This option retrieves the missing component and commits it to the branch.
Remove: This option removes the reference to the missing component and should only be used if it is confirmed that deploying without the component in the branch is safe.
Click the Missing dependencies tab.

Fixing API Version Errors
If the PreDeploy Fix found API version errors, you can fix them by updating to the correct version.
Fixing Missing Dependencies
Retrieve Missing Components
The selected metadata will be retrieved into your branch and added as a commit.
Click Retrieve.

Click Add for each dependency component to retrieve.
Click Retrieve.

Enter a Commit Message for the changes to the branch.
Click the Connection dropdown menu.
Select the Salesforce org to retrieve the dependent components from.

Click Run.

After starting the Retrieve Missing Dependencies job, it will be displayed on the Activities tab as a Pre Deploy Fix Update job.

Remove Missing Components
The references to those components are removed from your branch, preventing deployment errors.
Click Remove.

Click Add for each dependency component to retrieve.
Click Remove.

Enter a Commit Message for the changes to the branch.
Click Run.

After starting the Remove Missing Dependencies job, it will be displayed on the Activities tab as a Pre Deploy Fix Remove job.

Last updated
Was this helpful?
















