Sep 11, 2013

Microsoft CRM 2011, import CSV file with entity references (lookups)

While most of the time you probably could use a LookupMaps to set up an entity references in you import maps, you may come to situation there you want put actual ID's (references) in your CSV file. So, the tricky part here is the format. To create EntityReference you need entity type name and it's GUID. How would you put that into CSV string? The answer is like this:


Note that surrounding quotes are required, because of the comma.


  1. Unfortunately, this does not work in CRM 2011. Instead, you have 2 options:
    (1) you need to provide the display value associated with the lookup. If the display value is not unique, the import will fail.
    (2) you provide the GUID without the 'entity_type_name'. During the import, when you map the lookup field, do not map to the name field. Instead, use the lookup icon, to map to the primary key field. Have a look at this post

    1. This works (at least worked not so long ago) in CRM 2011, since I've used it personally.