Get Ready for the Next Release of Microsoft Dynamics CRM
Problems configuring the CRM Outlook client? Use the wizard!
Customer Center for Microsoft Dynamics CRM 2013
Customer Center for Microsoft Dynamics CRM 2011
Technical Support FAQ: Online | On-Premise
Developer Center and SDK
In CRM4 you could update existing records via bulk import. This functionality is theoretically still there in 2011 but it does not seem to work.
As per SDK documentation:
The configuration information that is required for importing data is contained in the import (data import) (Import) entity and the import file (ImportFile) entity.
To configure data import, do the following:
In short the combination ModeCode=1 (Update) and FileTypeCode=0 (CSV) is rejected with an error message that says that this file format is not valid for update.
Even if you try to use XML it does not work unless you use a pre-exported XML file. Pre-exporting a file works perfect if you are a user updating his records, certainly not if it's a import job that needs to update hundreds of thousands of records!
I have the same issue. It is unbelievably hard to get an answer from any of ms employees to see if this is possible.As it looks now CSV files are not allowed for updates.
I did some digging into the API using reflector and found out that API uses method ValidateInputAndFillDefaultsForUpdateMode in the Microsoft.Crm.ObjectModel.ImportFileService. That checks wheter the filetypecode = 1, and otherwises throws an error. FileTypeCode = 1 one means XML. CSV=0.
Therefore, if my observations are correct, CSV updates are not possible using CRM2011. However this would be a huge dissapointment for me my and my team so i hope i am wrong.
Did anyone figure out if this is true or not? it seems like I am having issues with updating using CSV as well.
What about doing it via XML files?
Take a look at this video:
Would that suffice?
The video by Gus shows the way, and I have used this successfuly quite a few times now.
However a couple of gotcha's that have bitten me are;
It works if you type data straight into the export file columns that you want to update.
it works if you copy/paste special with Values from source cells that you have manually entered the data.
It DOESNT work if you copy/paste from source cells that have been, say, exported from a SQL Query. Still trying to figure out a way round this, any suggestions are very welcome.
[addition] I have found if you copy the values you want to update into Notepad it strips out all formatting, you can then copy the values from Notepad into the export file columns and the import works fine.
If you have any de duplication rules on the entity you want to update, then select Allow Duplicates on your Import. Dont worry, it uses the hidden colums (i.e. GUID in column A) to update the correct record.
If you or someone else has updated one of the records between your Export and subsequent re import it wont process that record (it uses hidden colum C Modified On to prevent that). You will need to export the records again.
If you watchout for these you can certainly use Bulk Import to successfully update your data.
Thanks for adding those tips Alayton.
Please let us know if these steps have solved the issue for you guys.
Has anybody found a way to disable those validations?
I have migrated from 4.0 and we used to use CSV to update records, I can not change to excel format.
The Modified On validation is also giving me trouble, I definitly need to skip that validation.
I'll keep you updated if I can figure out how to handle.
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics