Updating Records With MS Dynamic CRM 4.0 Import Wizard

Records update feature is another one of those features I learned to hate in CRM. First we were teased in the Titan previews with it. Then it wasn’t in the RTM of the CRM, and then rumors were that one of the rollups (I forget which one) for CRM included this option. I say rumors because I never found it after applying the rollup.

Well, not until I bumped into it one day by chance. And I was so happy I took a screenshot and sent it out to a few colleagues to share my happiness. A few days latter I was back at the home office and wanted to try it out, prepared a test import for update and it wasn’t there to be found!

But it is, and here is how you can get the mysterious Enrich data by updating records rather than creating new records option to show up in your data import too.

Export the data you want to update
Build your query, or export the data from a view. You can omit mandatory fields if you are not updating them. Now for the tricks that make the update work:

Export the data into a Dynamic worksheet, open the Excel file and edit the data as needed.

Select the whole worksheet, not just the records, then right click on any of the columns and select the Unhide option. Non Excel users watch out, right click Unhide on a filed will not unhide the columns we need.

Now you should have gone from this:

To this:

The record ID is what makes the magic of the update work. But this is not enough. Now you need to move the ID column to be the first one and rename it to Record Name, in my example - Opportunity. The export added two spaces in front of the exported column name, make sure you remove them when renaming the column. The end result should look a little like this:

The GUIDs in the first column, and the record name in the header row are the key for this operation. They are enabling the CRM to recognize that you are using the existing records and what entity you are trying to update. 

Save the file as a CSV; and if you are using any special characters remember to save it in Unicode format.

Enrich your records
Now that you have your file you can go to the Import Data wizard. Pick out your data file and delimiters (by default Excel 2007 will use no delimiter for data and semicolon as a field delimiter). On the second screen you should see the checked Enrich data by updating existing records rather than creating new records option; the record type drop-down should be filled in and disabled; and data map should be set to Automatic and disabled as well.

When testing I was using the sample data set you see in the screenshots above, and trust me those two fields are not the only mandatory ones. So why am I not getting any errors from the wizard? Because we are updating. The ignored column is the Owner, which is not valid for create and update actions.

You can proceed with the Data Import wizard, and see it running on the Imports page.

Published Thursday, July 30, 2009 11:22 AM by Ranko

Comments

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, October 01, 2009 8:41 AM by Peter Clements

Good blog. It works well.  For anyone trying to update case records watch on the naming of the object. Your ID will say incident id - however, the object is called Case!

Peter.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Tuesday, January 26, 2010 5:50 PM by pkavanagh

Nice to see this blog entry. I am not sure how I can roll this out to users, without a lot of support headaches, but it is very useful info.

Paul

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Tuesday, February 02, 2010 6:20 AM by Axel & Fredrik

Very useful! Thanks a lot, it works and solve some time for the project (and for business)!

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Tuesday, February 09, 2010 8:46 AM by Malob

For those customers with restricted database access, it should be noted that execute permissions are required for a dynamic worksheet.

In my case, even as the CRM admin, I don't have rights to open a dynamic worksheet as I don't have database permissions.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, February 12, 2010 11:58 AM by Carl

Hi,

I've got e-mails imported to a system, but they are all missing the Description field. So i teste your method to do the update.

Exported all records with guids, edited rows in excel, and tried to import. The mapping is set to automatic, and update existing records works.

But i'm getting this message from the Import Source file:

"Import has encountered an error and has been canceled. Your system has been resored to its original state. At least one attribute mapping has its IsSystem attribute set to 1. Import cannot create system attribute mappings."

I've included just three fields in the csv. Email; Subject; Description. I even removed Subject and got the same message.

Any suggestions?

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, February 25, 2010 11:59 AM by Mike Dekker

I cannot get the unhide function of Excel to show the GUID column.  Does this function work with the online version of CRM 4?

Mike

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, February 25, 2010 5:55 PM by Ranko

Hi Mike,I am not 100% sure if it works in the online version, but I will try to access my demo account tomorrow (I think it is still valid). I don't see a reason why it wouldn't be. It was a planned feature, dropped from the release, and exposed again in one of the roll-ups - and I hope Microsoft updates their own servers :)

To get the GUIDs from a dynamic worksheet export option. And then make sure that all the cells (not only the ones containing data are selected. If you select only those (so in my screen shot columns A and B) the hidden column will not show up.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, February 25, 2010 5:59 PM by Ranko

Hi Carl,

Sorry for missing your reply - I messed up my notifications.

E-mail import might not be all that easy because Activities are not regular entities, they are actually spread out more in the back end.

From the error I would make sure that all the header columns are named properly, and that you do not have a typo in any possible drop down field.

To make sure the update will run OK, I'd try a single record update on just one pure text column like the title or the body of the e-mail.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Monday, March 29, 2010 1:04 PM by Steve Larson

Thanks for the great blog!  This works.  I was forced to use the static worksheet option but found the "unhide" displayed the GUID.  I just removed the { } from the GUID's.

This is a huge benefit and will allow ongoing UPDATE maintenance to my database with an automated solution.

Thanks, Steve

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Wednesday, April 14, 2010 3:05 AM by Vekondja Kuzee

Thanks for the info Ranko but do you know what roll-up this is part of?

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Wednesday, April 14, 2010 3:17 AM by Ranko

Honestly I don't, but I think it was R3 or R4 at the latest.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, July 08, 2010 1:00 PM by Brian Robinson

Thanks Ranko - that was a great help.  One other thing - if you have renamed the entity that you are importing the import will go ahead but it will have a status of failed.  Renaming it to its original name sorts it out.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, July 22, 2010 4:49 PM by Josée Bouchard

Hi this was very usefull and it almost worked for me. I am trying to update a text field in a custom entity. I was able to export to excel find the GUID, save to csv and import in crm (I even got the enrich data check box) But i get the same error message as Carl :

"Import has encountered an error and has been canceled. Your system has been resored to its original state. At least one attribute mapping has its IsSystem attribute set to 1. Import cannot create system attribute mappings."

I am 100% sure that the attribute names are correct, any idea why this would be?

Thanks

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, July 23, 2010 5:28 AM by Ranko

Did you rename the entity? Can you take a look at this thread to see if it helps any: social.microsoft.com/.../debd2d94-8a1d-498e-92be-f5a70bcb2290

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Wednesday, September 01, 2010 9:50 AM by Mostafa El Moatassem bellah

And What if i want to update the owner ?????

what should i do ??

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, September 02, 2010 3:31 AM by Ranko

@ Mostafa

Updating the owner is not supported through Import tool (and thus through the update functionality of it). One trick you might try is to create a workflow that will trigger on record update, that will check for some parameters and then according to those reassign the record.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, September 02, 2010 8:32 AM by Mostafa El Moatassem bellah

Is there a way to update ownership using the data migration manager ???

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, September 02, 2010 8:45 AM by Ranko

I am really not sure. I think so, but we have never used the DMM.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Thursday, September 02, 2010 8:48 AM by Mostafa El Moatassem bellah

Is there a way to use the data migration manager to update the owner ???

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, March 04, 2011 6:24 AM by Margaret Trinder-Widdess

I'm trying to update a custom attribute in the Product entity which is a lookup on a new custom entity - Product Category.  The import update appears to work OK, but the Product Category attribute is still unpopulated after the import. I've tried using the name value and the GUID for the product category attributes, but the lookup doesn't get updated.  Any ideas?

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, March 04, 2011 7:07 AM by Ranko

Margaret, I presume you get no errors?

Can you try something stupid? Create a custom entity with two lookups: one to Product, one to Product Category. Create a matching pair record, and then try to update the Product by running a workflow on the new entity.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, March 04, 2011 8:10 AM by Margaret Trinder-Widdess

No, I didn't get any errors on the original imports.  I'm guessing updating lookups is not supported.

I tried your suggestion with a couple of records and it worked.  It's a bit of a long way round, but probably quicker than writing some custom code to update the product with the category.

Thanks very much for your help.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, March 04, 2011 9:10 AM by Ranko

Not a problem. Lookups are supported, but there are some strange cases when this turns out. I just bumped into just such a case myself.

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Friday, March 04, 2011 12:18 PM by Jennifer

I am getting the same errors that other people are...

"Import has encountered an error and has been canceled. Your system has been resored to its original state. At least one attribute mapping has its IsSystem attribute set to 1. Import cannot create system attribute mappings."

I have a custom entity called sales reps and am have the export with guid's and when i try and re-import it looks like it is going to work, but then fails with the above error, is importing to custom entities possible?

Thanks

# re: Updating Records With MS Dynamic CRM 4.0 Import Wizard

Tuesday, December 06, 2011 1:09 AM by pankaj

i try this. but statuscode attribute in opportunity, it datatype status are not update through this solution.

Any one please help me.

pankajkaumar@gmail.com

Leave a Comment

(required) 
(required) 
(optional)
(required)