Common Deployment Errors and How to Fix Them
Salesforce deploy failures are terse — a one-line component error that rarely says why it happened or what to do. This section decodes the common ones: what the message means, why Salesforce rejected the component, and how to fix it. In mtdt.io, these same failures carry a hint in Deploy History that explains the cause and the fix inline.
Errors covered
- "You cannot deploy to a required field" — a profile or permission set is trying to set field-level security on a universally required field. Drop that field's FLS entry.
- "Duplicate value found" / uniqueness clash — a record-type label collides with one on the target, a field is being made unique while duplicate data exists, or a profile/layout has a repeated entry.
- "No such column" after deploying a field — the field deployed but its field-level security didn't, so it's invisible to SOQL and the API until you grant Read.
- "Test only deployment cannot update a field from a Master-Detail to Lookup" — Salesforce blocks a Master-Detail ↔ Lookup conversion in a Validate (test-only) run; a real deployment is supported.
Explained inline, without a page here
Deploy History decodes more failures than the list above. Among them:
- Connected apps can't be created on the target — and what to do when the app must exist there first.
- External Client App OAuth settings must be configured on the target — the OAuth configuration does not travel through metadata.
- Quick Deploy validation went stale — Salesforce discards a validation after 10 days; see Scheduled Deployments and Quick Deploy.
- Picklist can't be converted to a global value set in place.
- Salesforce is still recalculating sharing — retry once the recalculation finishes.
- Named Credential password didn't deploy — secrets never travel with metadata.
- Report type / Lightning page / referenced field is missing on the target — deploy the dependency first.
- Not enough Apex test coverage — which classes are short.
Each of these appears as a hint next to the failing component, with the cause and the fix.
More errors are documented as we verify them end to end. If you hit a deploy error that isn't here, contact support — and check whether pre-deployment checks would have caught it before the run.