Salesforce.com migration tool - Deploying Weblink and migrating files with special characters

February 08, 2013

Recently, I noticed the followed issues in SFDC Ant deployment.

Issue 1: Typo in XML <name> metadata data for Web Link

Just to reiterate, all the buttons and links created under "Buttons and Links" section of the Object are treated as Web Links.

Screenshot from Force.com Migration Tool Guide









It should be WebLink, not Weblink. Otherwise, the following error occurs while extracting the package : package.xml - Entity type: 'Weblink' is unknown.

Correct XML is: 


<types>
<members>Opportunity.Cancel_CheckOut</members>
<members>Opportunity.Generate_Deal_Sheet</members>
<name>WebLink</name>
</types>

Issue 2: Unable to deploy entities with special characters

Example:


<types>
<members>User w/Export </members>
<name>Profile</name>
</types>


I tried to deploy Profile entities with special characters like '-' and '/'. Tool is able to extract the Profile's fine. But, while deploying it has thrown the following error.


Error: package.xml(<profilename>):An object '<profilename>' of type Profile was named in package.xml, but was not found in zipped directory

The issue has occurred as the migration tool is URL-Encoding the names before saving them to the disk. For example profile User w/Export is retrieved as User%20w%2FExport. While deploying the package the tool is not able to find the match for User w/Export.

As a work around, I have changed the profile names in package.xml (In package folder) to match with the encoded name.

XML would look like:

<types>
<members>User%20w%2FExport</members>
<name>Profile</name>
</types>


You Might Also Like

0 comments

Popular Posts

Twitter