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
DianeMDianeM 

Creating a package with field sets included

I have an unmanaged packaged defined in my development org.  I create a project in Eclipse that references this package.  When I refresh this project from the server, none of the definitions of the field sets are downloaded.

 

We have a development process that includes checking all components in a project into SVN.  This is used to share code and eventually it drives the creation of the managed package.

 

I see multiple references to having field sets in a managed package but I cannot find any clues as to how I can retrieve the meta data to keep it in a source control system.

 

Is this something that Salesforce does not yet support or is there something I have to do to enable it.  The package on the server includes the field sets so perhaps it is the Eclipse IDE that has a problem. I am currently on version 23.

 

Any suggestions would be greatly appreciated.

aalbertaalbert

According to the metadata API , it looks like FieldSet is a sub-component of the custom object definition. 

 

http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_fieldset.htm?SearchType=Stem

DianeMDianeM

I agree with you.  I hand coded the field set tags in the object file in eclipse and then saved it to the server.  When I look at the object on the server it has the field sets now but the save to server also downloads the object file again and now my hand-coded changes are gone.  Is it possible that the ide does not support field sets or I have to do something else to the ide so it can find them?

DianeMDianeM

I continue to experiment with this - with some positive and some negative results.  

 

I decided to try the migration tool to retrieve objects from the org and then to deploy to a different org.  I am using the migration tool at version 23 and when I created my package.xml I specified 23 as the version.  Using sf:retrieve I get the object and all of the field set data.  I was able to deploy this same object successfully using the sf:deploy.

 

Any interaction with the Eclipse IDE however, results in dropping all references to field sets and if I attempt to save the file I retrieved using the migration tool I get errors.

 

I wonder if that has to do with the version in the package.xml?  In Eclipse my content is based on an unmanaged package in an org.  The package xml is at version 20 - I can't figure out how to get this updated to 23 - any ideas?

 

Thanks,

 

Diane

Chris JohnChris John

Hi Diane,

 

I tested this out with v23 of the Force.com IDE on Eclipse 3.5.

 

I created an unmanaged package with a field set on the Contact object and created a new IDE project based on the unmanaged package. I was then able to refresh changes made to a field set definition, and also to save changes made in the IDE to server.

 

I think you are on the right track in highlighting the package.xml being at v20, my package.xml is v23. Could you try the following:

 

* You mentioned you were on v23 but could you double check your force.com IDE from Eclipse > Help > About Eclipse SDK > Click force.com IDE icon

* Try creating another basic unmanaged package with just a field set, then creating an IDE project based on that. Does that show the same behaviour?

 

Thanks,

 

-cj