【问题标题】:cannot be converted from original type 'System.Int64' to target type 'Microsoft.Xrm.Sdk.OptionSetValue'无法从原始类型“System.Int64”转换为目标类型“Microsoft.Xrm.Sdk.OptionSetValue”
【发布时间】:2020-07-31 21:42:24
【问题描述】:

使用数据工厂将产品表数据导入动态365时,出现以下错误:

{
    "errorCode": "2200",
    "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorTypeConversionFail,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The attribute 'statecode' with value '0' cannot be converted from original type 'System.Int64' to target type 'Microsoft.Xrm.Sdk.OptionSetValue'.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=System.InvalidCastException,Message=Specified cast is not valid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'",
    "failureType": "UserError",
    "target": "Copy data1",
    "details": [] }

这适用于所有值都设置为 0 的字段“状态代码”,以便正在导入的产品的状态处于活动状态。 我无法找到解决此错误的方法。

【问题讨论】:

  • 请分享导入数据的代码。您是否尝试过将数据导入 Microsoft.Xrm.Sdk OptionSet / OptionSetValue 对象,可以转换为 int?

标签: dynamics-crm azure-data-factory dynamics-365 dynamics-365-sales


【解决方案1】:

问题已解决。这是因为我正在将数据导入 Produkt(产品的德语名称),而我的用户界面语言是英语。我将语言更改为德语,这也是基本语言,并将表名更改为 Product。这解决了我的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-23
    相关资源
    最近更新 更多