Branch Pre-Deploy Fix
Pre-Deploy Fix proactively detects and resolves missing dependencies before deployment.
What is Pre-Deploy Fix
Pre-Deploy Fix is a validation process that runs before a deployment to detect issues such as missing components, broken references, or unmet dependencies.
It helps prevent deployment failures by either:
Retrieving missing metadata, or
Removing or updating references to problematic components
This ensures your deployment is cleaner and less error-prone.
How to run Pre-Deploy Fix
Open the branch.
Click the three dots (⋮) menu in the branch header and choose PreDeploy Fix from the dropdown.
A Pre-Deploy Fix page appears.
Select connection: pick a Salesforce org (source) against which to run the fix.
Click Run to start the Pre-Deploy Fix process.
The system queues the job and you’ll be able to see it under the Jobs list.
Checking Status
After triggering, the Pre-Deploy Fix job appears in the Jobs list with status like Queued, In Progress, Completed, or Exception.
Use filters in the Jobs list (e.g. “Status”) to isolate PreDeploy Fix entries.
Once completed, click on the job to see detailed results and logs.

Retrieving Missing Dependencies
If Pre-Deploy Fix detects missing metadata dependencies (e.g. components referenced but not present), the UI options include:
Retrieve Missing Components — choose one or more missing items and bring them into the branch.
Remove — drop references to the missing components if safe.
The retrieve action often requires entering a commit message and selecting a connection before finalizing.
How to retrieve missing dependencies using the Retrieve button
In the Pre-Deploy Fix Result view, navigate to the Missing dependencies tab.
Each missing component is listed with details like type (ApexPage, ApexClass, etc.) and reference (e.g., Profile).
Click Add beside the components you want to retrieve, or click Add All to select all.
Once selected, click the Retrieve button at the top.
Enter a commit message, choose the connection (the org where the missing components will be retrieved from), and click Run.
The selected metadata will be retrieved into your branch and added as a commit.


How to remove missing dependencies using the Remove button
In the Pre-Deploy Fix Result view, open the Missing dependencies tab.
Click Add beside the dependencies you want to remove, or use Add All.
Click Remove at the top.
Enter a commit message and click Run.
The references to those components are removed from your branch, preventing deployment errors.
How to view results and logs
After a Pre-Deploy Fix finishes, click the job in Activities → Jobs.
You’ll see the summary (status, connection, who created, duration, start/end time).
On the right, detailed logs show what happened — start time, total dependencies found, completed steps.
There’s also a See logs button in the Errors screen to open logs directly.
Best Practices
Always run a Pre-Deploy Fix before Validate or Deploy to reduce the chance of failures.
Prefer Retrieve when possible, so all dependencies are properly 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 Pre-Deploy Fix after retrieving or removing until the Missing dependencies list is empty.
Use filters (status, type, date range) in Activities to quickly track your Pre-Deploy Fix jobs.
Review logs whenever a job ends with Exception or Action Required to understand what needs fixing.
Last updated
Was this helpful?
