I am currently working on a Azure Data Factory Mapping.
SQL Server to 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
using JSON we use:
{\"[email protected]\":\"/territories(c8a29516-4001-e311-98f3-78e3b5089b9d)\"}"
Don't know how to reference this field in AZURE DATA FACTORY so it updates correctly. Currently I have tried Mapping using 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": [] }
The error I am getting is in Azure Data Factory. The JSON was just an example of how we are doing it in C# currently.
I am setting District as GUID and Mapping District to new_districtlink@EntityReference.
SELECT
ACCOUNTID,
'2EC67250-E3C4-E311-ABE1-6C3BE5BDA9AC' AS DISTRICT
FROM [dbo].[VendVendorV2Staging]
WHERE ADDRESSLOCATIONROLES = 'Business';