Effortless Dynamics 365 Record Updates with Azure Data Factory

In the realm of data migration and integration, Azure Data Factory (ADF) serves as a robust tool for moving and transforming data across various systems. A common scenario involves updating existing records in Dynamics 365 (D365) using the internal GUID (Globally Unique Identifier) without relying on additional migration references. This article will guide you through the process of updating a D365 Account record with new telephone and address information using ADF.

Understanding the Internal GUID in Dynamics 365

Each entity within Dynamics 365, such as an Account, Contact, or Opportunity, has a unique identifier known as the GUID. For example, the Account entity uses the field `accountid` as its GUID. This identifier is crucial for precisely targeting records during updates.

Internal GUID

Let's assume we have an existing Account in D365 with the following unique identifier.

A1B2C3D4-5678-90EF-GH12-IJ345KLMNOP6

We need to update this Account with the following new details.

  1. MainPhone: +123456789
  2. Address1Street1: Suite 789
  3. Address1Street2: 123 Elm Street
  4. Address1City: Springfield
  5. Address1Postalcode: SP1 2AB

Updating the Account Record
 

1. Set up Source Data in Azure SQL Database

Start by ensuring that the updated information is stored in an Azure SQL Database. This table should include the D365 Account's GUID and the new values you intend to apply. For example, the table might contain the fields `MainPhone`, `Address1Street1`, `Address1Street2`, `Address1City`, `Address1Postalcode`, and the `accountid`.

 Azure SQL

2. Create Datasets in Azure Data Factory

  1. Source Dataset: This dataset points to the Azure SQL Database containing the updated Account information. Ensure that the schema is imported to facilitate easy mapping later.
  2. Sink Dataset: This dataset connects to the D365 Account entity. It will serve as the target for the update operation.
    Azure Data

3. Configure the Copy Activity

  1. Add a Copy Activity to your ADF pipeline.
  2. Set the Source to the Azure SQL Table containing the Account data.
  3. Set the Sink to the D365 Account dataset.
  4. In the Mapping section, map the fields from your SQL table to the corresponding fields in the D365 Account entity.
     Copy Activity

4. Configure Upsert Operation

  1. In the sink configuration, set the "Write Behavior" to Upsert.
  2. You can leave the “Alternate Key Name” as None because you’ll be using the `accountid` GUID for the update.
    Upsert Operation

5. Execute the Pipeline

Running this pipeline will update the specified Account record in Dynamics 365 with the new telephone and address information from the Azure SQL Database.

Pipeline

6. Verify the Update

After executing the pipeline, you can use D365’s Advanced Find to confirm that the Account record has been updated with the new values as expected.

Conclusion

Updating Dynamics 365 records using Azure Data Factory with the internal GUID is a streamlined approach that eliminates the need for alternate keys or additional migration references. By following the steps outlined above, you can efficiently update your D365 records with precision, ensuring data consistency and accuracy across your systems.

Thanks for Reading!! DO Like And Upvote!!