You need to sign in to do that
Don't have an account?

How do I use the WorkBench to retrieve metadata?
I’m trying to figure out how to retrieve Field Audit Trail metadata using the WorkBench, and I’m stumped. I used the WorkBench to deploy a zip file named package-Dev.zip, which contained the following files:
1) A file named Account.object:
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<historyRetentionPolicy>
<archiveAfterMonths>14</archiveAfterMonths>
<archiveRetentionYears>10</archiveRetentionYears>
<description>Account object field history retention policy -- Dev</description>
<gracePeriodDays>0</gracePeriodDays>
</historyRetentionPolicy>
<fields>
<fullName>BillingAddress</fullName>
<fullName>City_Mailing_Address_Group__c</fullName>
</fields>
</CustomObject>
2) A file named package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account</members>
</types>
<version>32.0</version>
</Package>
Now I want to use the WorkBench to retrieve the metadata (history retention policy and fields) that I deployed for the account object via package-Dev.zip. What ‘s the XML code that I need to use to retrieve that metadata? I'm not an XML or API programmer, and all of the examples I've found seem to assume that I know more than I do, so I'm lost.
Thanks for your help!
1) A file named Account.object:
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<historyRetentionPolicy>
<archiveAfterMonths>14</archiveAfterMonths>
<archiveRetentionYears>10</archiveRetentionYears>
<description>Account object field history retention policy -- Dev</description>
<gracePeriodDays>0</gracePeriodDays>
</historyRetentionPolicy>
<fields>
<fullName>BillingAddress</fullName>
<fullName>City_Mailing_Address_Group__c</fullName>
</fields>
</CustomObject>
2) A file named package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account</members>
</types>
<version>32.0</version>
</Package>
Now I want to use the WorkBench to retrieve the metadata (history retention policy and fields) that I deployed for the account object via package-Dev.zip. What ‘s the XML code that I need to use to retrieve that metadata? I'm not an XML or API programmer, and all of the examples I've found seem to assume that I know more than I do, so I'm lost.
Thanks for your help!
You can go to Tab --> Migration --> Retrieve --> Provide the packge.xml (Mention the component you want to reterive)
Please go through (http://myfirstcloudforce.blogspot.com/2014/01/retrieve-data-using-workbench-or-take.html)
Hope this helps
--
Thanks,
Swayam
Here's the package.xml file I submitted: But when I go through the "retrieve" process, I get back the same file I sent. I assume the problem is with my "name" element, because I'm getting a message that says "Problem: Entity type: 'HistoryRetentionPolicy' is unknown." I've tried various other values, but nothing seems to work. Any ideas? Thanks so much for your help!
HistoryRetentionPolicy is a field or object ?
You need to use this code, Hope this help
--
Thanks,
Swayam
Maybe it's not possible to retrieve the History Retention Policy metadata via the Workbench?
Please check (http://resources.docs.salesforce.com/200/5/en-us/sfdc/pdf/field_history_retention.pdf)
--
Thanks,
Swayam
Anyway, thanks so much, Swayam, I greatly apprecaite all of your help.
HistoryRetentionPolicy_c