8

On my development org, I have a certain package installed, containing several custom objects. I have added a few custom fields to some of those objects through the web GUI. I have tried to pull those changes into the SFDC Project in my local Eclipse workspace, but even after I refreshed the metadata components list, I can't find and select these objects for retrieval.

Does anyone know how I could retrieve these extensions to the packaged custom object?

  • Is it a Managed or Unmanaged package? Installed Managed Package components aren't accessible via eclipse. – Ben Oct 21 '13 at 13:44
9

To retrieve the managed package objects along with your custom metadata, you have to manually add the objects you want to retrieve to your package.xml file. For example, to retrieve a custom object, you might already be retrieving the Account object like this:

<types>
    <members>Account</members>
    <name>CustomObject</name>
</types>

You simply need to add the namespaced object name to this list. This is the "API Name" visible on the object page in the Salesforce UI

<types>
    <members>Account</members>
    <members>packagenamespace__CustomObject__c</members>
    <name>CustomObject</name>
</types>

If you just want to retrieve the fields that you are adding to that object for subsequent deployment, you can specify them in a CustomField type

<types>
    <members>packagenamespace__CustomObject__c.MyField__c</members>
    <name>CustomField</name>
</types>

Remember that the CRUD / FLS rules for any profiles that you are retrieving will include this object / field.

Please also see my response to this similar question about layouts How to retrieve layouts of customs objects belonging to a managed package?.

This technique applies generally to most (all?) objects in the metadata API.

-2

I don't know that managed package object data, even user added custom fields, is available via anything other than the UI. Perhaps the Tooling api (and therefore the dev console) has access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.