none
Upsert is not working properly in Copy Data Activity having sink as D365 RRS feed

  • Question

  • I have an entity to which I am copying data from BLOB to D365. It says that Copy Data for D365 will use UPSERT i.e. if record exist it will update and if doesn't exist it will create.

    But in my case it is creating the existing record as well.

    I already created Alternate key having combination of two columns  in D365 on the said entity and made sure of setting them in Copy Data Activity. But still it is going and creating the existing record.

    Is there any other setting that I am missing in order to make this work.


    Wednesday, May 8, 2019 6:15 PM

Answers

  •  Thanks Govinda , you are correct writeBehavior should be set to "Upsert" .
    We need to use the Primary Key Field for Upsert .



    Thanks Himanshu

    Monday, May 13, 2019 10:32 PM
    Moderator

All replies

  • Hello Govinda , 

    Can you please elaborate how are you using the ADF to copy the data , are you using the copy activity and using the blob as the source and D365 as the sink ? If you are following any document , please share the link with us . 

    If you are using the copy activity , you needs to set the value for writeBehavior = Yes.

    Please refer the below link fir details 

     https://docs.microsoft.com/en-us/azure/data-factory/connector-dynamics-crm-office-365#dynamics-as-a-sink-type


    Thanks Himanshu

    Thursday, May 9, 2019 11:02 PM
    Moderator
  • Thanks for the response.

    I am using Copy Activity where BLOB is the source and D365 is the sink. I noticed that Copy activity does UPSERT based on the primary key field i.e. if primary key value exist in CRM it updates the record if not then create it. But I want UPSERT to happen on Alternate Keys instead of Primary Key Field. 

    Is it possible to do ?

    As you mentioned writeBehavior should be set to yes. But it seems you misunderstood it should not be set to yes it should be set to UPSERT.


    Monday, May 13, 2019 6:31 AM
  •  Thanks Govinda , you are correct writeBehavior should be set to "Upsert" .
    We need to use the Primary Key Field for Upsert .



    Thanks Himanshu

    Monday, May 13, 2019 10:32 PM
    Moderator