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:
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.
Very nice video.
However, I fall into a different problem when it comes to editing the data. In the exported list, I need to be able to do some auto-editing based on a new column formula.
Export of Leads with columns: E-mail, field with 2 options (Allow and Do Not Allow)
I need to be able to find e-mails that matches another list of e-mails and set the field to Do Not Allow in order to re-import it back to CRM.
How would I do that on the XML document?
I hope you understand.
I have an urgent requirement in CRM ,i want to update the imported records.
Can i achieve this using plugin?
If Yes how can i do this?
The only way to bulk update records in CRM is if you export the data from CRM for re-import. (or find another way to get record GUIDS into an XML file). To the best of my knowledge, it relies upon the GUID to make the correlation to update the record in CRM. You can only import to create new records without a GUID.
There is a workaround here: www.powerobjects.com/.../updating-records-in-microsoft-dynamics-crm