function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
glorgeglorge 

Force.com IDE : Cannot deploy individual Custom Field on a Custom Object

Hi All,

 

I just logged this issue with SF.com support.  However, I figured I'd post the issue to the forum as well, to see which venue yields a better response. :)

 

---

 

I have a single Custom Field ("Handles_Title__c" ) on a Custom Object ("Purchase__c" ) that I would like to deploy via the Force.com IDE. However, I am getting an error "Must specify a non-empty label for the CustomObject" when I try to deploy this field.


Steps for Reproduction:

Preconditions:

I have two sandboxes, "greg" and "stage". Both sandboxes have acustom object called "Purchase__c". However, the Purchase__c object onthe "greg" sandbox has an additional field called "Handles_Title__c"that does not exist in "stage".

Steps:

1) In eclipse, go to File -> New -> Force.com Project. Create a new project pointing to the "greg" sandbox.

2) On the "Choose Initial Project Components" page, choose the"Selected metadata components" radio button, and click the "Choose..."button.

3) On the "Choose Metadata Components" page:
3.a) Expand the "objects - custom list"
3.b) Expand the "Purchase__c" list
3.c) Expand the "customfield" list
3.d) Check the box next to "Handles_Title__c"
3.e) Click the "Ok" button

4) Back on the "Choose Initial Project Contents" page, click the "Finish" button.

5) Right click the "src" folder in the newly created project. Select Force.com -> Deploy to server...

6) Enter login credentials for the "stage" sandbox, click "Next".

7) On the "Archive Options" screen, uncheck both "archive" checkboxes, click "Next".

8) On the "Deployment Plan" screen, check the "Overwrite" box for "Purchase__c". Click the "Next" button.  


Expected Results:

The custom field "Handles_Title__c" should be created in the stage sandbox.


Actual Results:

Deployment fails with the error: "Must specify a non-empty label for the CustomObject" 

 

 

Message Edited by glorge on 12-08-2009 04:13 PM
Best Answer chosen by Admin (Salesforce Developers) 
JonPJonP

This is a known issue and will be fixed in our Spring '10 platform release.  It may require upgrading to the Force.com IDE for Spring '10, which will be released shortly after the servers are upgraded.

 

Jon

salesforce.com Product Manager 

Message Edited by JonP on 12-08-2009 05:11 PM

All Answers

JonPJonP

This is a known issue and will be fixed in our Spring '10 platform release.  It may require upgrading to the Force.com IDE for Spring '10, which will be released shortly after the servers are upgraded.

 

Jon

salesforce.com Product Manager 

Message Edited by JonP on 12-08-2009 05:11 PM
This was selected as the best answer
glorgeglorge

Thanks for the quick response.   Do you know if this is an issue with the Force.com IDE, the Force.com Migration Tool (which I believe the IDE is built on top of), or the Metadata API?

 

In other words - would I be able to work around this issue by using the Force.com Migration Tool or direct Metadata API calls? 

 

Thanks,

Greg 

JonPJonP

It's in the Metadata API, which indeed is used by the IDE and the Migration Tool (Ant).

 

If you search DeveloperForce using the error message returned, you should be able to find another thread where people are discussing possible workarounds.  I don't have the URL handy. 

glorgeglorge

FYI... here is the workaround suggested by SF.com support:

 

 

Follow these steps to deploy individual or partial fields using Force.com IDE: 

1. Please retrieve the complete object meta-data into Force.com IDE

2. Remove the field references that you don't want to deploy and save the file. This action doesn't delete the fields in the Org. 
3. Now try to deploy the custom object file to another instance and see if that works. 

The important meta-data components that need to exist as part of the file are - deploymentStatus, nameField, label, pluralLabel and sharingModel. 

So please construct your meta-data file similar to as shown below if you want to perform partial updates to the object. 

<?xml version="1.0" encoding="UTF-8"?> 
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> 
<deploymentStatus>Deployed</deploymentStatus> 
<fields> 
<fullName>Currently_Employed1__c</fullName> 
<defaultValue>true</defaultValue> 
<label>Currently Employed1</label> 
<type>Checkbox</type> 
</fields> 
<nameField> 
<displayFormat>C-{00000}</displayFormat> 
<label>Candidate Number</label> 
<type>AutoNumber</type> 
</nameField> 
<label>Candidate</label> 
<pluralLabel>Candidates</pluralLabel> 
<sharingModel>Private</sharingModel> 
</CustomObject> 

tstrongtstrong
I used this method once and it worked for me, but now I can't see to get it to work anymore.  Any idea when the new IDE version will be available to fix this?
JonPJonP

The new Force.com IDE for Spring '10 will be released on April 19th.

glorgeglorge

FYI... the original solution proposed by SF.com support did not work at first.  After some follow-up emails, here the final solution that worked for me:

 

 

I have investigated the issue with the deployment of the partial field failure from .greg sandbox to .stage sandbox. The issue is caused because the deployment object file was missing a property and the system defaulted that property to false. Since there are workflow activities based of that object, that property can't be deployed as turned off. The property is called "enableActivities" that is available on the object detail page as "track activities". Following is the complete object file which worked for me: <?xml version="1.0" encoding="UTF-8"?> <CustomObject xmlns="http://soap.sforce.com/2006/04/metadata"> <deploymentStatus>Deployed</deploymentStatus> <fields> <fullName>Grounding_Dealer__c</fullName> <label>Grounding Dealer</label> <referenceTo>Account</referenceTo> <relationshipLabel>Grounded Vehicles</relationshipLabel> <relationshipName>Purchases1</relationshipName> <type>Lookup</type> </fields> <fields> <fullName>Handles_Title__c</fullName> <label>Handles Title</label> <picklist> <picklistValues> <fullName>Y</fullName> <default>false</default> </picklistValues> <picklistValues> <fullName>N</fullName> <default>false</default> </picklistValues> <sorted>false</sorted> </picklist> <type>Picklist</type> </fields> <label>Purchase</label> <nameField> <label>VIN</label> <type>Text</type> </nameField> <enableActivities>true</enableActivities> <enableReports>true</enableReports> <pluralLabel>Purchases</pluralLabel> <sharingModel>ReadWrite</sharingModel> </CustomObject>

 

 Hopefully this fix works for you. 

 

Thanks,

Greg

 

cmendlercmendler

It does not seem that this fix was delivered with Spring '10 release.  I have updated Eclipse to 3.5 and downloaded the latest Force.com IDE update that came out on the 19th.... still hit this error.  Any insight?  Was this actually fixed as promised?  I did not see it in release notes....

tstrongtstrong
I'm still having the same problem, as well. I ended up having to use a Change Set to push my custom object field. Why hasn't this been fixed?
glorgeglorge

Any update on this issue yet?  

DTCFDTCF

I am still having this issue after uprading both the Force.com IDE as well as the two orgs that I'm working with, trying to go from Sandbox to Developer.

 

Thanks!

cmendlercmendler

Still no response on this???  Last post from SFDC side was over 6 months ago.... HELP!


 

seahorceseahorce

I spoke with a senior engineer at Salesforce and he was aware of the issue.  He didn't know of any timeline for when they were planning to fix it.  

 

His suggestion was to use Change Sets to migrate the fields on custom objects.  In my experience with Change Sets, they can be spotty, so you really have to double check that they migrated everything properly.

cmendlercmendler

The workaround of using Change Sets is just not acceptable at this point - like you said they can be pretty spotty and they are very time consuming to create.  Especially for large orgs with 100 custom objects and thousands of fields to sift through without any real sorting options that are viable.  Pulling the entire object into Eclipse and then removing unwanted elements until you have a couple leftover fields is also ridiculous.

seahorceseahorce

I couldn't agree more.  My org has over 150 custom objects with each having at least 50 custom fields, so this is a huge pain point when I try to migrate a large amount of code every month.  I'll be the first to download the fix for this!

glorgeglorge

While I continue to use the Eclipse IDE to write Apex/Visualforce code, I have recently switched over to the Ant-based Force.com Migration Tool for actual deployments.  This issue with deployment of a single field does *not* occur with the Migration Tool. 

 

Maintaining a separate set of Migration Tool scripts does require some additional overhead, and it comes with a steeper learning curve than the Force.com IDE.  The Migration Tool also comes with its own set of bugs to contend with (let's face it - Apex/Visualforce development tools are never going to be anywhere near as rich or robust as Java or .net development tools).  But so far I have found that scripting with the Migration Tool allows for a closer approximation to a "real" enterprise, continuous-build environment than any other Salesforce deployment options. 

 

There's no excuse for allowing this Force.com IDE issue to persist for as long as it has.  But until it does get fixed, I would reccommend giving the Migration Tool a try. 

cmendlercmendler

One year later.... still nothing

cmendlercmendler

*Jeopardy Theme*

seahorcesolnsseahorcesolns

I logged a case for this on the SF partner portal, but they closed it because "T3 has confirmed that this one is a known issue with R&D and they are working on this issue. "  Not sure how they are tracking this internally or how they plan to communicate to us that this issue has been resolved.  I got an update to the Force.com IDE last week, but that didn't resolve this.

JCripeJCripe
This is still a problem in Force.com IDE 31.00.201406301722 trying to deploy a custom table from a Winter '15 sandbox to a Spring '15 developer sandbox.  The custom columns aren't found.