Using Branch PreDeploy Fix
PreDeploy Fix proactively detects and resolves missing dependencies before deployment.
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
View Results
Click the Activities tab.
Check that the Pre Deploy Fix Search job status is Completed.
Click the Pre Deploy Fix Search job.

To help find a PreDeploy Fix job, you can click the All Types dropdown filter menu and select Pre Deploy Fix Search. This will filter the jobs to show just PreDeploy Fix jobs.
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.
See the Fixing API Version Errors section below to learn how to resolve these errors.
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.
See the Fixing Missing Dependencies section below to learn how to resolve these errors.
Click the Missing dependencies tab.

If the Missing dependencies tab isn't visible, it means there are no missing dependencies.
Re-Run PreDeploy Fix
Once you've fixed all API version errors and resolved missing dependencies, rerun the PreDeploy Fix job to ensure no issues remain. The following screenshots show a PreDeploy Fix job that completed without finding any issues.
Both the API version errors and the Missing componets tables display No Components.


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.
If you have alread Removed dependency components, don't select them to retrieve. If you are unsure, you can rerun the PreDeploy Fix job.
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.
If you have alread Retrieved dependency components, don't select them to remove. If you are unsure, you can rerun the PreDeploy Fix job.
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?













