Multi-Entity data file import mapping

Recently, we published a post on our global CRM Blog that talks about a feature in Microsoft Dynamics CRM 2011 through which you can Import data from a single source file into multiple entities.

Importing two or more entities from a Single File

The example in the Blog post and out of the box is only if you have a single CSV file that has data that you want to split across the Contact and Account entities.


But, and if we want to do it for other entities (including custom entities)?

Let’s see how we can do it:

I created this Excel file with data from two entities (Contact and a custom entity called Soup):


Then, using Visual Studio as XML editor, created this Multi-Mapping test file, where I refer both entities and “Multiple” as EntitiesPerFile:

<Map Name="Multi-Mapping Test" Source="Import">

       <Description>Multi-Mapping file created by me</Description>



             <EntityMap TargetEntityName="contact" SourceEntityName="Contact" Dedupe="Ignore" ProcessCode="Process">


             <EntityMap TargetEntityName="new_soup" SourceEntityName="province" Dedupe="Eliminate" ProcessCode="Process">




Having the data and the template, let’s test it:

First, we need to import the template:




If any or both entities are custom entities, they must be present in the system by this time.


Once imported the Multi-Mapping file, we can go to Imports and select our data file (that contains data from multiple entities):


And once it is uploaded, we will choose our Custom Data Mapping:


Using our custom mapping file, we are now able to map the data for both entities at once:




Best Regards,

Dynamics CRM Team

Comments (3)

  1. Paul says:

    Is there any way to do a check if exists else create? I.e. if the soup already existed then use that otherwise create?

  2. JD says:

    @Paul That's what the field Dedupe="Eliminate" does

  3. Pierre Joubert says:

    Awesome post 🙂

    Constantly getting a SQL Timeout error when importing, and that's even when testing with the standard Account/Contact data map.  It is happening on three different environments, geographically different too, one is in Azure.

    I even added the OLDBTimeout and ExtendedTimeout entries in the registry, still no go 🙁

    In all honesty the standard one should work but it doesn't, not sure what i am doing wrong.  

    Any thoughts would be great thanks.