Monday, May 07, 2012 7:10 AM
Data Import issuses:
I created a data import application following the sample provided in the sdk. The entity that I was working on is Contact.There are around 58 fields including the custom fields and over 5000 records to process. For testing purpose I tried to process only 2 records.
I mapped all the fields from the source with coresponding fields in CRM. The field mapping include text , picklist and the lookup types.
I was able to create the system job successfully in CRM, however when I check the import status in CRM UI, it shows as 'Failed'. There is no information about the failure.
I modified the code to just process the text fields later, but still no luck. At this point it is very hard to debug, as the error occurs inside CRM.
Any help would be greatly appreciated.
Monday, May 07, 2012 8:30 AMModerator
Did you tried to run your code before creating system job ?? have you done error handling in your code.
I will suggest you to debug your code as stand along application first and check if everything is working fine
Monday, May 07, 2012 5:03 PM
Yes I did run the code, I had no issues with the system job creation. There were no errors at all. Initially I started with just mapping 5 text fields from the source file and when I ran the application, it created the system job and the data was also imported without any error.
After confirming the code is working, I added other fields and mapping to the code. But, for some reason the import is not successful. I tried recreating the CSV file and made sure there is no extra columns added etc.
The wierd thing is, CRM Import job doesn't show any error in the failure tab.
Monday, May 07, 2012 5:15 PM
I noticed something in the system job status
Import File Parse - Succeeded
Import - Canceled
Transform - Failed with exception
The given key was not present in the dictionary.
Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Crm.Asynchronous.ImportOperationTransform.AdjustLengthForNvarcharFields(ImportFileHelperData importFileHelperData)
at Microsoft.Crm.Asynchronous.ImportOperationTransform.TransformData(Guid organizationId, Guid importId)
at Microsoft.Crm.Asynchronous.ImportOperationTransform.ExecuteImportOperation(Guid organizationId, Guid importId, Int32 operationType)
at Microsoft.Crm.Asynchronous.ImportOperation.InternalExecute(AsyncEvent asyncEvent).
Tuesday, July 03, 2012 9:07 AM
Any update on this issue? I am facing the same error while importing the contracts data.