How to move record types using Apache ANT tool in Salesforce?

1. Execute the below Query in https://workbench.developerforce.com.

Query:

SELECT sObjectType, DeveloperName FROM RecordType

2. Copy the result in an excel file.

3. Use Concatenate excel function to create like below

<members>sObjectType.DeveloperName</members>

4. Copy all the concatenated SobjectName.DeveloperName in the package.xml like below

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Account.Sample1</members>
<members>Account.Sample2</members>
<name>RecordType</name>
</types>



<types>  
<members>*</members>
<name>Profile</name>
</types>
<types>
<members>*</members>
<name>Layout</name>
</types>
<version>30.0</version>
</Package>

5. Retrieve and then deploy.

Cheers!!!

No comments:

Post a Comment