Deployment error Must specify a non-empty label for the CustomObject

This error occurs when the Object's label tag is missing in the promotion branch. Below you will find a possible scenario where this can happen.

Scenario

A custom object has been created in a lower environment. Instead of committing the whole object to the next environment, only a few fields are committed. This will create an incorrect file for the object in the destination branch. The file won't include the label tag. The next time you try to commit the whole object, the deployment will fail because the promotion doesn't contain the label.

Solution

You need to fix the feature branch and the promotion branch by copying the feature branch where the whole object was committed. Once you have done this, you can deploy again.

To avoid this issue in the future, you should commit and deploy the entire object once it is created.


How did we do?