no CustomObject named X found: meaning and how to fix it
Quick answer
no CustomObject named X found: A component in the deployment (a layout, permission set, profile, flow or field) refers to an object that is neither in the target org nor part of this deployment. The same message pattern applies to other types, such as "no CustomField named ...". Start with: Add the missing object or field to the package.xml or deploy source so it ships in the same deployment.
Typical message: In field: object - no CustomObject named Invoice__c found
Cause
A component in the deployment (a layout, permission set, profile, flow or field) refers to an object that is neither in the target org nor part of this deployment. The same message pattern applies to other types, such as "no CustomField named ...".
How to fix no CustomObject named X found
- Add the missing object or field to the package.xml or deploy source so it ships in the same deployment.
- Check the object API name spelling and the namespace prefix.
- If the component should not reference it, remove the reference from the metadata file.
Have a different message? Paste it into the error decoder, which matches it against 45 common Salesforce errors in your browser.
Frequently asked questions
What does no CustomObject named X found mean in Salesforce?
A component in the deployment (a layout, permission set, profile, flow or field) refers to an object that is neither in the target org nor part of this deployment. The same message pattern applies to other types, such as "no CustomField named ...".
How do I fix no CustomObject named X found?
1. Add the missing object or field to the package.xml or deploy source so it ships in the same deployment. 2. Check the object API name spelling and the namespace prefix. 3. If the component should not reference it, remove the reference from the metadata file.
More Deployment errors
SFDX Talk is unofficial documentation. It is not affiliated with, endorsed by, or sponsored by Salesforce, Inc. Message text varies slightly by release and context, so confirm against the official page before relying on it.