I’ve been doing a lot of data imports to CRM 2011. ¬†When it comes to showing the client where the fields are getting mapped, it’s a bit of a hassle.

If you export the data map you get a nice XML document, but you can’t exactly show that to your business lead (it’s difficult to read even if you know XML).

So, I created a nice chunk of XSL to make a better way to present the data mapping.

<?xml version=”1.0″?>
<xsl:stylesheet version=”1.0″

<xsl:template match=”EntityMaps/EntityMap”>
<h2><xsl:value-of select=”@SourceEntityName”/> | Target: <xsl:value-of select=”@TargetEntityName”/></h2>
<table border=”1″>
<tr bgcolor=”#9acd32″>
<th>Process Code</th>
<xsl:for-each select=”AttributeMaps/AttributeMap”>
<xsl:sort select=”ProcessCode” order=”descending”/>
<xsl:sort select=”SourceAttributeName”/>
<xsl:value-of select=”SourceAttributeName”/>
<xsl:if test=”TargetAttributeName != ””>
<xsl:value-of select=”TargetAttributeName”/>
<xsl:if test=”TargetAttributeName = ””>
<xsl:text disable-output-escaping=”yes”><![CDATA[&nbsp;]]></xsl:text>
<xsl:value-of select=”ProcessCode”/>

Save that to a file in the same folder as your XML file, then add the line below to the XML file itself (where ImportMapping.xslt is the name of the xsl file).

<?xml-stylesheet type=”text/xsl” href=”ImportMapping.xslt”?>