ADF SQL to CRM Copy Data Pipeline Error

Shamsuddin, Natasha 1 Reputation point
2020-09-14T03:42:15.47+00:00

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.

My Source does a query from SQL:
SELECT
CAST(NULL as uniqueidentifier) AS ACCOUNTID,
A.VENDORACCOUNTNUMBER AS ACCOUNTNO,
11 AS ACCOUNTTYPE,
VENDORORGANIZATIONNAME AS LEGALACCOUNTNAME,
VENDORSEARCHNAME AS ACCOUNTNAME,
CURRENCYCODE AS CURRENCY,
DEFAULTDELIVERYTERMSCODE AS DELIVERYTERMS,
DEFAULTDELIVERYMODEID AS MODEOFDELIVERY,
CASHDISCOUNTCODE AS CASHTERMS,
DEFAULTPAYMENTTERMSNAME AS PAYMENTTERMS,
'YES' AS ISPRIMARY,
'BILL TO' AS ADDRESSPURPOSE,
A.ADDRESSDESCRIPTION AS BILLTONAME,
A.ADDRESSCOUNTRYREGIONID AS BILLTOCOUNTRY,
A.ADDRESSCOUNTYID AS BILLTOCOUNTY,
A.ADDRESSCITY AS BILLTOCITY,
A.ADDRESSSTATEID AS BILLTOSTATE,
A.ADDRESSSTREET AS BILLTOST,
A.ADDRESSZIPCODE AS BILLTOZIP,
A.FORMATTEDPRIMARYADDRESS AS BILLTOADDRESS,
PRIMARYPHONENUMBER AS BILLTOPHONE,
PRIMARYPHONENUMBERDESCRIPTION AS BILLTOPHONEDESC,
'199 - CORPORATE' AS DISTRICTNAME,
LOWER('2EC67250-E3C4-E311-ABE1-6C3BE5BDA9AC' ) AS DISTRICT
FROM [dbo].[VendVendorV2Staging] A
WHERE A.ADDRESSLOCATIONROLES = 'Business';

I then map the source to CRM accounts entity. Don't know how to reference this field in AZURE DATA FACTORY so it updates correctly. The field is DISTRICT (GUID) and I am mapping it to newdistrictlink@EntityReference

24297-capture.png

I am getting 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": [] }

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,012 questions
{count} votes