[英]Azure Data Factory - Pipeline Copy from SQL to CRM - Error
I am currently working on a Azure Data Factory Mapping.我目前正在研究 Azure 数据工厂映射。
SQL Server to CRM SQL Server 到 CRM
There is a Entity Reference look up field that I am trying to update.有一个我正在尝试更新的实体参考查找字段。 Do not know how to.不知道怎么办。 The field is: new_districtlink --> Territory/Territories字段为:new_districtlink --> Territory/Territories
using JSON we use:
{\"new_districtlink@odata.bind\":\"/territories(c8a29516-4001-e311-98f3-78e3b5089b9d)\"}"
Don't know how to reference this field in AZURE DATA FACTORY so it updates correctly.不知道如何在 AZURE DATA FACTORY 中引用此字段,以便正确更新。 Currently I have tried Mapping using newdistrictlink@EntityReference目前我已经尝试使用 newdistrictlink@EntityReference 进行映射
I get the following error:我收到以下错误:
"errorCode": "2200", "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorDynamicsOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Dynamics operation failed with error code: -2147220891, error message: The real-time workflow named "ACCOUNT: Pull in Region and Division from District(Territory)" failed with the error "For a Vendor Account Type, select 199 as the district.".,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Message=The creator of this fault did not specify a Reason.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'", "failureType": "UserError", "target": "CMA CRM VENDOR", "details": [] } "errorCode": "2200", "message": "'Sink' 端发生故障。ErrorCode=UserErrorDynamicsOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Dynamics 操作失败,错误代码:-2147220891,错误消息:名为“ACCOUNT: Pull in Region and Division from District(Territory)”的实时工作流失败,出现错误“对于供应商帐户类型,选择 199 作为区。”.,Source=Microsoft.DataTransfer.ClientLibrary .DynamicsPlugin,''Type=System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]],Message=创建者此故障的原因未指定。,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'", "failureType": "UserError", "target": "CMA CRM VENDOR", "details": [] }
The error I am getting is in Azure Data Factory.我得到的错误是在 Azure 数据工厂中。 The JSON was just an example of how we are doing it in C# currently. JSON 只是我们目前在 C# 中如何做的一个例子。
I am setting District as GUID and Mapping District to new_districtlink@EntityReference.我将 District 设置为 GUID 并将映射 District 设置为 new_districtlink@EntityReference。
SELECT
ACCOUNTID,
'2EC67250-E3C4-E311-ABE1-6C3BE5BDA9AC' AS DISTRICT
FROM [dbo].[VendVendorV2Staging]
WHERE ADDRESSLOCATIONROLES = 'Business';
I see there's no issue with Json payload you used, it is correct to map an EntityReference (lookup).我看到您使用的 Json 负载没有问题,映射 EntityReference(查找)是正确的。
I guess this is data validation message coming back from CRM Real time workflow which is validating the territory (district) against the created account type.我猜这是从 CRM 实时工作流返回的数据验证消息,它根据创建的帐户类型验证领土(地区)。
The error message clearly says - the value you passed (guid in district link Json payload for territory) is not expected value based on business logic validation in real time workflow.错误消息清楚地表明 - 您传递的值(地区链接 Json 有效负载中的 guid 区域)不是基于实时工作流中的业务逻辑验证的预期值。 For vendor type account, 199 is the expected district and find out the guid of that territory record and update the Json.对于供应商类型帐户,199 是预期的地区,找出该地区记录的 guid 并更新 Json。
Or change the account type to something else than vendor.或者将帐户类型更改为供应商以外的其他内容。 Then it should work, or check with CRM dev team or BA for business rules before implementing and testing ADF integration for creating the account record.然后它应该可以工作,或者在实施和测试 ADF 集成以创建帐户记录之前与 CRM 开发团队或 BA 核对业务规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.