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.
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.
- MainPhone: +123456789
- Address1Street1: Suite 789
- Address1Street2: 123 Elm Street
- Address1City: Springfield
- 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`.
2. Create Datasets in Azure Data Factory
- 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.
- Sink Dataset: This dataset connects to the D365 Account entity. It will serve as the target for the update operation.
3. Configure the Copy Activity
- Add a Copy Activity to your ADF pipeline.
- Set the Source to the Azure SQL Table containing the Account data.
- Set the Sink to the D365 Account dataset.
- In the Mapping section, map the fields from your SQL table to the corresponding fields in the D365 Account entity.
4. Configure Upsert Operation
- In the sink configuration, set the "Write Behavior" to Upsert.
- You can leave the “Alternate Key Name” as None because you’ll be using the `accountid` GUID for the update.
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.
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!!