Decoding Data Import Errors: The file specifies a list value that does not exist in Microsoft Dynamics CRM

  • Home >>
  • Dynamics CRM >>

Data import is equal parts science and magic, but leaning heavily towards the magic side. Sometimes the errors you receive make sense, sometimes they do not.

Let’s take this message for example:

The file specifies a list value that does not exist in Microsoft Dynamics CRM

Here is the actual error you will see when looking at the log file:

 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The file specifies a list value that does not exist in Microsoft Dynamics CRM.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”>
<ErrorCode>-2147220589</ErrorCode>
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic”>
<KeyValuePairOfstringanyType>
<d2p1:key>targetentity</d2p1:key>
<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema” i:type=”d4p1:string”>account</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>targetattribute</d2p1:key>
<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema” i:type=”d4p1:string”>customertypecode</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>picklistvalue</d2p1:key>
<d2p1:value xmlns:d4p1=”http://www.w3.org/2001/XMLSchema” i:type=”d4p1:string”>4</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The file specifies a list value that does not exist in Microsoft Dynamics CRM.</Message>
<Timestamp>2017-01-12T18:56:23.5305137Z</Timestamp>
<ExceptionSource i:nil=”true” />
<InnerFault i:nil=”true” />
<OriginalException i:nil=”true” />
<TraceText i:nil=”true” />
</OrganizationServiceFault>

Lots of great gobbledy-gook, so let’s look at the major pieces:

  • The error actually states, “The file specifies a list value that does not exist in Microsoft Dynamics CRM.” If you think about it, there is only one data type that has a “list value” and that is an OptionSet.
  • targetentity is the entity in question, which in this case, is an account,
  • targetattribute is the field, which in this case, is the customertypecode, also known as the Relationship Type field.
  • picklistvalue is  the value that is not found, in this case a 4. OptionSets were formerly called PickLists, hence the name.

All this results in the fact that the import value of 4, was not found in the customertypecode OptionSet as an option and the import failed because of that.  Either removing the value of 4 from the import file or adding a value of 4 to the customertypecode will solve the problem.

As mentioned, not all errors are so clear, but in this case, it was very clear.

Leave a Reply 0 comments