Issues with Data Import in CRM 2011 using SDK.
-
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.
Thanks,
Karthik
All Replies
-
Monday, May 07, 2012 8:30 AMModerator
Hi,
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
Mahain : Check My Blog
Follow me on Twitter
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question. -
Monday, May 07, 2012 5:03 PM
Hi Mahender,
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.
Thanks,
Karthik
-
Monday, May 07, 2012 5:15 PM
Hi,
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).Thanks
Karthik
-
Tuesday, July 03, 2012 9:07 AM
Hi Karthik,
Any update on this issue? I am facing the same error while importing the contracts data.
Thanks,
CRMRocks