Getting error with ADF dataverse connector

Pankaj Singh 20 Reputation points
2024-08-22T12:30:55.73+00:00

Hi,

I am using a copy activity to populate 'ownerid' column of dataverse Account entity. I got the ownerid by a lookup from dataverse 'systemuser; entity in a previous step. But I am getting the below error. Please help

ErrorCode=DynamicsMissingTargetForMultiTargetLookupField,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot find the target column for multi-target lookup field: 'ownerid'.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'

Thanks

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

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 23,096 Reputation points
    2024-08-22T20:46:00.9333333+00:00

    Based on this thread :

    There was a documentation update (in response to a GitHub I raised) that explained how to do it.

    I'll document how I did it here.

    To populate a contact with against a parent account, you need the parent accounts GUID. Then you prepare a dataset like this:

    SELECT 
    -- a NULL contactid means this is a new record
    CAST(NULL as uniqueidentifier) as contactid,
    -- the GUID of the parent account
    CAST('A7070AE2-D7A6-EA11-A812-000D3A79983B' as uniqueidentifier) parentcustomerid,
    -- customer id is an account
    'account' [parentcustomerid@EntityReference],
    'Joe' as firstname,
    'Bloggs' lastname,
    

    Now you can apply the normal automapping approach in ADF.

    Now you can select from this dataset and load into contact. You can apply the usual automapping approach, this is: create datasets without schemas. Perform a copy activity without mapping columns.

    Another link to help you : https://community.dynamics.com/forums/thread/details/?threadid=e6323043-c97d-4543-9855-fc7136c7eb2f

    0 comments No comments

  2. AnnuKumari-MSFT 32,816 Reputation points Microsoft Employee
    2024-08-29T06:38:25.7566667+00:00

    Hi Pankaj Singh ,

    Thankyou for posting your query on Microsoft Q&A platform .

    I understand that you are facing the following error while trying to use a copy activity to populate 'ownerid' column of dataverse Account entity : "ErrorCode=DynamicsMissingTargetForMultiTargetLookupField,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot find the target column for multi-target lookup field: 'ownerid'.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'"

    Error code: DynamicsMissingTargetForMultiTargetLookupField

    • Message: Cannot find the target column for multi-target lookup field: '%fieldName;'.
    • Cause: The target column doesn't exist in the source or in the column mapping.
    • Recommendation:
      1. Make sure that the source contains the target column.
      2. Add the target column in the column mapping. Ensure that the sink column is in the format {fieldName}@EntityReference.

    Reference: Troubleshoot the Dynamics 365, Dataverse (Common Data Service), and Dynamics CRM connectors in Azure Data Factory and Azure Synapse

    Hope it helps. Kindly accept the answer if you find it helpful. Thankyou

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.