You need to sign in to do that
Don't have an account?
philbo
Custom Fields on Std. Objects in Eclipse IDE Package Explorer
Hey,
In the force.com Eclipse IDE (v11.1.1.200801151537), the Package Explorer window includes custom object definitions (e.g. "src\unpackaged\objects\<customObj>.object").
Where in the Package Explorer, if anywhere, are custom FIELD definitions on standard objects displayed?
Putting it another way, if I want to include a custom field on a standard object as part of a force.com 'deploy' to another org via the IDE, is there any way to do so?
thanks!
-philbo
To include custom fields on standard objects, you need to edit src/unpackaged/package.xml. To get ALL custom fields on a standard object, add an additional <members> tag the CustomObject section:
Alternatively, you can specify the custom fields to include, by name, by adding a CustomField section:
Note that in both cases, you will get a new .object file in the src/objects/ folder.
We're exploring ways to make this easier and more intuitive in a future release of the IDE.
Jon
And yes, package.xml is a local file. It's basically a filter that determines what metadata components are downloaded from the server.
You may encounter a known issue in the IDE v11.1 where executing "Refresh from Server" at the level of the Force.com project (the topmost folder in Package Explorer) can overwrite your src/unpackaged/package.xml file--so you may want to make a copy. This is fixed in the upcoming Spring '08 release of the IDE.
Also, you should be aware that including a Standard Object in package.xml causes field-level security settings to be included in profiles. If you use the CustomField method, the profiles in your project will only include FLS for the fields you explicitly include. If you use the CustomObject method, your profile metadata will include FLS for all fields on the standard object--both custom and standard fields. Be careful what you deploy to a production environment, as you don't want to accidentally overwrite your FLS. (This is why you have to explicitly include Standard Objects in package.xml today.)
Jon
Resurrecting this thread...quoting from an earlier post:
To get ALL custom fields on a standard object, add an additional <members> tag to the CustomObject section:
Inspecting this snippet - The first <members>*</members> line - is that shorthand for "all custom objects"? Would that be valid syntax in the package.xml file? (I suppose I could just go in and try it...) And to reiterate what you said - if I want to also include ALL custom fields on a second standard object; e.g. Contact, then it suffices to simply add an additional line
to that <types> block, right?
Thanks!
-philbo
Is there a way to get all fields (including standard fields) for standard objects and/or all standard objects without explicitly mentioning each one of them.
<types>
<members>*</members>
<members>*</members>
<name>CustomObject</name>
</types>
The above Dosent work.
<types>
<members>*</members>
<members>Account</members>
<name>CustomObject</name>
</types>
The above works but doesn’t get standard fields
Regards
Vivek