+ Start a Discussion
eleemoodyeleemoody 

Eclipse Force.com IDE - Failed error message - Must specify a non-empty label for the CustomObject

Please help.  We are very new to using Eclipse as a deployment tool. 

 

We have a validation rule that is attached to a Custom Object.  When we try to deploy just the validation rule, I get an error that says:

 

# Deploy Results:
   File Name:    objects/Plan__c.object
   Full Name:  Plan__c
   Action:  NO ACTION
   Result:  FAILED
   Problem: Must specify a non-empty label for the CustomObject

 

I've reviewed the Plan__c object label and plural label and they are both populated with a value, so this must be related to something different. 

 

We've been able to do the same kind of validation rule deployment from Standard Objects without issue. 

 

I got it to work by deploying the entire Custom Object (which picks up all fields, rules, etc.), which was fine in this case.  However, there may be times where we do not wish to deploy the entire object.  Can you please tell me what can be done to alleviate the error we are receiving?

 

Thanks for any and all help.

Message Edited by eleemoody on 07-28-2009 09:47 AM
ShanLambertShanLambert

I'm having the same problem - with the addition of a long text area that I can't migrate, so moving the entire object isn't possible.  The long text area field is going away shortly, anyway, so it's not something I have to maneuver around, but when I tried to maneuver around it to see what happened ... same thing.

 

Standard objects as well as custom reports, fields, etc., all work.  It's only when I try a partial of the custom object that I get the hitch.  (Even a single-field test failed.)

 

I'm using 3.4.2 but had the same problem in the last 3.3 I had.  I'm assuming it's OE but haven't found my error yet to correct it.

kevinbnpowerkevinbnpower

Having the same issue on a deploy for the full custom object. Oddly, I had deployed this same object to other instances and haven't run into the error at all, but for whatever reason it's now happening, and I'm wondering why it has suddenly cropped up now.

 

I've tried this on both 3.3 and 3.4.

 

 

flogoetteflogoette
I think I found the root of this bug.
 
The error "You must specify a non-empty label for CustomObject" happens when I try to deploy only selected fields from a custom object (partial deployment). When I subscribe for the entire custom object, the deployment succeeds (full deployment).
 
I investigated into the custom object metadata file in Eclipse, and found that the tags <label>, <plurallabel>, <nameField> etc. are not contained in the metadata file for the partial deployment. I tried to add those tags manually, but they were automatically removed again after building the project.
 
So the bug seems to be that Force.com IDE does not provide the required custom object tags in a partial deployment.
kevinbnpowerkevinbnpower

I don't doubt your solution to the issue, I simply don't see the same behavior. Full OR partial deployment results in the error for me.

 

 

Does anybody know if there is an IDE reference available so we could see officially what triggers this error?

flogoetteflogoette

Do you find the tags for <label>, <plurallabel> etc. in your metadata file for the custom object?

You have to select the entire custom object in Eclipse (just tick the top checkbox). You will get a remark "Subscribe to changes" next to the custom object. This makes sure you take all metadata on the custom object, including the object description.

 

Regards,

Florian

Bvanb-zNetBvanb-zNet

Does anybody know when this bug will be fixed? 

Keith987Keith987

I got this error reported when I had a custom object listed in both the CustomObject (in my case using the * wildcard) and CustomField parts of package.xml. Eliminating the object from the CustomObject part (by explitly listing the custom object names) fixed the problem. Both definitions of custom objects and definitions of custom fields are stored in .object files but with different elements required in each case.

shilpa paishilpa pai
I too faced the same problem when I tried to deploy some of my objects into the repository. 
I got the Error 
All Component Failures:
1.  objects/Bug__c.object -- Error: Must specify a non-empty label for the CustomObject
So the first thing I did was checked my object in Eclipse and saw that the only data that was seen was 

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"/>

and there was no data in my Eclipse even after I did a refresh from Server. 
So finally this is what helped me
Right click on the Trunk name -> Go to Force.com -> You either can see Work Online (which means you are working offline) or Work Offline(which means you are working online). So the first step is to be sure that you are working offline. 
The next and the final step is Search for package.xml this is also generaly found under Package Explorer and towards the extremem bottom of the trunk tree. Just Right click -> Replace with -> Latest from Repository

Now go to the object you want to commit and do refresh from server you will now be able to see your data also commit successfully.

Regards
Shilpa 
 
robin patpatiarobin patpatia
https://success.salesforce.com/answers?id=90630000000hIUKAA2
willardwillard
Ensure in your package xml that you are only moving the custom field (Name = CustomField).  If you specify the entire custom object in your package, then you will get the non-empty label error.
Nicholas ZozayaNicholas Zozaya
If you're getting this via Heroku/DX, probably happening because you pasted metadata directly into force-app/main/default instead of using sfdx force:mdapi:convert --rootdir <directoryName>. Create a folder called "mdapioutput" in your project's top-level folder (same level as force-app), paste the metadata component/types you'd like to include in your project into the "mdapioutput" folder. 

Then, run sfdx force:mdapi:convert --rootdir mdapioutput to convert metadata into source format within your sfdx project. This worked for me.