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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
Method 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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0