Bulk Import and Delete fails in CRM 2011 RRS feed

  • Question

  • Hello All,
    Wondering if anyone has seen this before. I have been migrating data to an on premise install over the last month. Now my bulk task import fail about half way through the parsing phase. It  finishes with a status of "failed" before importing anything. Here is the error message in the system job log:
    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)

    Has anyone see this before?

    Thanks in advance.
    Thursday, November 3, 2011 5:50 PM

All replies

  • It sounds like something in your data file is causing this. Perhaps quotes or commas where you didn't expect them to be, or probably more likely a piece of data in your import which is trying to find an optionset value or a look up which does not exist in a CRM.

    Whenever I've had this type of issue in the past I've used the rule of halves on the import file. i.e. split the file in half - import the first half, if there is no error then the problem line is in the second file. Split the second file in half and repeat the process. THis is the fastest way to find the line in the import file which is causing the problem. Analyse the line and you'll more than likely be able to spot the error.


    Hope that helps!!



    Paul Dowman, CRM Developer
    • Edited by Paul Dowman Friday, November 4, 2011 3:24 PM added clarity
    • Proposed as answer by Philippe LEAL Monday, November 7, 2011 6:45 PM
    Friday, November 4, 2011 3:22 PM