Salesforce deployment errors and how to fix them
Updated · By the Clientell AI team · How we write
A failed Salesforce deployment names its cause in the component-level message, not in the top-line status. Find that message below.
Each page has the exact error text, the usual causes, and the fix in Setup first and the CLI second. Change sets fail in their own ways, covered in the change set errors guide.
20 errors. 18 reproduced with a check-only deploy to a Salesforce developer org, the rest quoted from Salesforce sources.
Find yours by the exact message. Pasting a full error line works too.
Tests and code coverage
4 errors- System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AcctDefaults: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null objectCANNOT_INSERT_UPDATE_ACTIVATE_ENTITY when a deploy runs testsReproduced Nov 4, 2026
- Methods defined as TestMethod do not support Web service calloutsReproduced Nov 4, 2026
- System.AssertException: Assertion Failed: Expected a 15 percent discount: Expected: 85, Actual: 90.0System.AssertException: Assertion Failed on deployReproduced Nov 4, 2026
- Test coverage of selected Apex Class is 33.333%, at least 75% test coverage is requiredTest coverage below 75% on a Salesforce deployReproduced Nov 4, 2026
Missing dependencies
7 errors- In field: field - no CustomField named Account.Vendor_Rating__c found'no CustomField named X found' on a layout deployReproduced Nov 4, 2026
- No MODULE named markup://c:priceUtils found : [markup://c:quoteBanner]'No MODULE named markup://c:name found' on an LWC deployReproduced Nov 4, 2026
- In field: QuickAction - no QuickAction named Log_Visit found'no QuickAction named X found' on a layout deployReproduced Nov 4, 2026
- Picklist value: Quantum Widgets in picklist: Industry not found'Picklist value not found' on a record type deployReproduced Nov 4, 2026
- This apex class is referenced elsewhere in Salesforce. Remove the usage and try again. : Visualforce Page - Unauthorized.'This apex class is referenced elsewhere' when you delete a classReproduced Nov 4, 2026
- This custom field is referenced elsewhere in salesforce.com. : Flow Version - 301Ka000000ZuZc'This custom field is referenced elsewhere' when you delete a fieldReproduced Nov 4, 2026
- line -1, column -1: Dependent class is invalid and needs recompilation: Class AccountValidatorClass_32 : Method does not exist or incorrect signature: void validateRequiredFields(List<Account>) from the type AccountValidatorClass_22Reproduced Nov 4, 2026
Flows
1 errorProfiles and permission sets
2 errorsData and field rules
3 errors- duplicate value found: <unknown> duplicates value on record with id: <unknown>'duplicate value found: unknown' on a Salesforce deployQuoted from sources
- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Phone is required on every account.: []FIELD_CUSTOM_VALIDATION_EXCEPTION in an Apex test on deployReproduced Nov 4, 2026
- Cannot set sharingModel to ReadWrite on a CustomObject with a MasterDetail relationship fieldMaster-detail and required field errors on a deployReproduced Nov 4, 2026
Manifest and API version
3 errors- Entity of type 'ApexClass' named 'LegacyQuoteHelper' cannot be found'Entity of type X named Y cannot be found' in SalesforceReproduced Nov 4, 2026
- The field apiVersion can't be "99". Enter a different value and try again.'The field apiVersion can't be' on a Salesforce deployReproduced Nov 4, 2026
- An object 'InvoiceSyncHelper' of type ApexClass was named in package.xml, but was not found in zipped directory'was named in package.xml, but was not found' on a deployReproduced Nov 4, 2026
Catch these before the deploy window
Clientell AI runs these checks on the bundle before the deploy, and asks before it changes anything in production. Platform deployments include a snapshot and rollback.
Questions about deployment errors
Where do I find the full error message for a failed Salesforce deployment?
In the target org, open Setup, search for Deployment Status, and click View Details on the failed row. The component-level lines name the real problem. For CLI deploys, read the component failures in the command output, not only the last line.
Which Salesforce deployment errors come up most?
Two common ones are missing dependencies and low Apex test coverage. Production needs at least 75% coverage across the org, and a component that refers to something the target org does not have fails with a "no X named Y found" message.
Can I check a deployment without changing the org?
Yes. A change set Validate, or sf project deploy validate and sf project deploy start --dry-run in the CLI, run the same checks and tests and then roll back. Nothing is saved.
Why does a deployment pass in the sandbox and fail in production?
Production enforces the 75% coverage rule and runs the tests. The sandbox may also have fields, classes or settings that production does not have yet. Validate against production before the release window.
Sources: Salesforce Help, deploy change sets, Salesforce Help, special behavior in deployments. Last reviewed November 2026.