Skip to main content

Resolving validation errors - "Must Specify a Non-Empty Label for the CustomObject"

Validation error "Must Specify a Non-Empty Label for the CustomObject" was surfaced during a deployment

Written by Vincent Maltby

Explanation of the error

This Salesforce error that Gearset is surfacing is usually encountered when only selected parts of a Custom object are being deployed (partial deployment), and a required tag is not present in the deployment.

Most likely, this is caused when a new part of a Custom object is created, but we are deploying through a Delta CI job, and therefore the entire Custom object is either not present or the tag is not being surfaced to Gearset from Salesforce.

Resolution

To work around this issue, run a comparison via Compare and deploy in Gearset to commit the entire Custom object metadata into the target branch.

Or you can deploy your new Custom object directly both to the environment branch (source of CI) and the Salesforce org (usually a target of your CI job). If the managed package is already in the filter and the error continues, check that the custom objects are in the commit to the branch, and recommit any that are missing.

Note: This can also be caused by managed packages that aren't included in your metadata filter. If the deployment runs from a CI job, add the managed package to that job's own filter, not just to a comparison you run by hand. To learn how to add managed packages to your filter, see Comparing managed package metadata with Gearset.

Further examples of this Salesforce validation error can be found here:

If this doesn't change anything, please send a message to our support team, who will be happy to help.

Disclaimer: This error is returned directly by Salesforce, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?