top of page

T#6 Data Import++ : Extending Import of data in CRM

Updated: Aug 3, 2021

Data Import++ is an XrmToolBox tool that allows you to Create - Upsert - Update and Delete records based on an Excel data import file.


The aim of this post is describing the steps for using the tool and exploring all of its functionalities.



1. Open XrmToolBox then open the tool


2. Pick the target entity where you would like your data to be imported to



3. Upon picking your entity, your CRM entity fields will be loaded by the tool



4. Click on BROWSE EXCEL and choose your Excel File.






5. Your Excel Columns will appear as Rows inside the grid. You can pick for each one the corresponding CRM field that it has to be mapped to.



Note that you can map many Excel Columns to the same lookup field in CRM.

In the previous image, the "Account_Name" and "Account Country" are mapped to the same "parentcustomerid" field.


In that example, we are choosing to do an UPSERT of contacts based on their CRM ID.

In case the contactid is found in CRM, the contact will be Updated with the excel data line. Otherwise the excel line will be created as a new record in CRM.


In another example you could have imagined importing contacts and choosing as a Key the First Name + Last Name + Email Address. The tool will fetch records matching these criteria and Update them or Create the record if no match is found.


6. Once the CRM fields have been chosen, click on PROCESS FIELDS.

This action will generate new Columns in your datagrid in case you have picked any of the following field types: Lookup - Boolean.


a. BOOLEAN field type:

For each of your Boolean field types you will be able to modify the True and the False values with the ones existing in your Excel File. To do so, just click on the gray cell and modify the string. In the previous example, the Boolean field is "Private?". We will modify "Yes" to "Private" and "No" to "Not Private" as these are the values present in our Excel File.


b. LOOKUP field type:

In order to process correctly your lookup fields, pick the entities that your lookup fields points to.


Then click again on "PROCESS FIELDS". That will get the entity fields of each one of the picked entities for the lookups.


You can now fill the Column "[Lookup] Field Name" with the respective fields.



The tool will search for the accounts with "name" and "address1_country" matching with the values present in the Excel lines being imported.

You can choose the behavior that you want in case more than 2 records are found matching the lookup criteria: "MAP THE FIRST FOUND RECORD TO THE LOOKUP" - "SKIP RECORD WITHOUT IMPORTING IT AT ALL" or even "IMPORT CRM RECORD WITH CLEARED LOOKUP". These are configured from the menu on the left under "Lookup field found > 1 record".


The "Filter on key found > 1 record" stands for finding more than 1 CRM record to Update / Upsert / Delete based on the chosen key(s). In this case you can choose to "DO ACTION FOR ALL" or to "IGNORE EXCEL LINE" without Updating/Upserting/Deleting.


If you have chosen fields of type OptionSet, you can choose to have Labels or Values (numbers) inside your Excel data corresponding to these fields. In case of choosing Labels, the tool will map the labels to the corresponding OptionSet values in CRM without taking into consideration Upper/Lower characters. In case you choose Values make sure having the correct integer number (without any spaces between numbers).

This configuration is picked under "OptionSet field format" on the menu to the left.



Make sure to choose the right CRM Action (Create - Update - Upsert - Delete) then click on IMPORT CRM.

This will trigger the chosen action and will import your excel data.

During the import, you can change the Filter Logs in order to show: SUCCESS - WARNINGS - ERRORS - or ALL the logs.

Changing the Logs Filter will automatically refresh the logs view. Otherwise, you can click on the small Refresh icon next to "Copy" in order to refresh the current import progress in the Logs. You can also click on "Copy" to Copy to your clipboard the Logs and then paste them to your preferred logs location (if needed).



In the tool's latest version, in the footer you can see the following information:

- Excel Rows Count: The number of Rows that will be taken into consideration during the import (excluding the first line : columns names)

- Success: Number of lines successfully created/updated/deleted.

- Error: Number of lines ignored or having generated an error with unsuccessful action.

- Created: Number of lines imported as a Create action in CRM.

- Updated: Number of lines imported as an Update action in CRM.

- Deleted: Number of lines imported as a Delete action in CRM.


Some of the tool's actual limitations:

- Lookup fields: You can only map String or Guid field types from within the related entity.

- OptionSet fields: If different optionset fields are present in your excel file, all of them should be of the same data type: Optionset VALUES or Optionset LABELS.

- Create CRM Action: You cannot force a guid even if mapping a guid excel column to the record's guid field. The CRM will generate a new Guid for the record.



Hope this tool helps you extend the CRM limitations! Do not hesitate to rate it on XrmToolBox and to comment on this post in case you have suggestions to improve it. ;)

You can also directly share the post by clicking on the bottom left (social media icons).



16,507 views15 comments

Recent Posts

See All

15 Comments


sharjeelarif
Feb 28, 2023

Has anyone experienced this unhandled exception the moment you open up any excel file?


************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

at DataImport.MyPluginControl.<>c__DisplayClass43_0.<ReadExcel>b__1(RunWorkerCompletedEventArgs args)

at XrmToolBox.Extensibility.Worker.<>c__DisplayClass4_0.<WorkAsync>b__0(Object s, RunWorkerCompletedEventArgs e)

at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)


need help asap!

Like

Raj Ready
Raj Ready
Aug 22, 2022

@ih.hanuschka has asked before. Great tool. Is there anyway we could save the settings?

Like

Anders Gustavsson
Anders Gustavsson
Jul 12, 2022

Is there a reason why the address latitude and longitude fields can't be mapped?

Like

markpittsnh
May 11, 2022

There is a major flaw when using this tool for update. When selecting the 'is key' column, the tool should validate that a 'CRM Field' is identified. Failure to do so, takes the first row, in the import Excel file, and tries to update every record, without considering a key field. In my situation, all the contact records in my CRM instance, ended up with the a last name of 'Smith'.


Like
Joseph Merhej
Joseph Merhej
Jun 26, 2022
Replying to

Hello Mark, Thank you for your feedback! Indeed while choosing a column as being your key field (in update or upsert cases) you should always make sure that it contains data, otherwise the tool will try mapping to an "empty key" in order to find CRM data (and would then capture wrong unexpected records)

Like

schwarz
Apr 06, 2022

Great tool. Although I have a problem: from time to time the import will not start. In the log it just says "Line 1 Colums Header" and that's it. The import is not conducted. Any idea why that might happen and how to avoid it?

Like
Joseph Merhej
Joseph Merhej
Jun 26, 2022
Replying to

Hello David,

This probably means that your file columns and format are not matching the expected format in the CRM.

I recommend :

- Removing from the file any unused/unwanted columns

- Adding the key column(s) as the first one(s)

- When possible making sure that all cells in the excel file are filled in for non-text fields

- Double checking that your excel file reads well the column(s) as Date ones (for date fields)

Like
bottom of page