Showing posts with label D365FO. Show all posts
Showing posts with label D365FO. Show all posts

Sunday, February 9, 2025

Understanding Dual Write in Dynamics 365: A seamless data integration approach

dual write image
New to dual write? Here's where you should start from. This isn't a deep-dive into this new capability from Microsoft, but the first step for you to understand the key differences between noth Dynamics 365 CE and F&O and why was this required.

What is Dual Write?

Dual Write is an out-of-the-box infrastructure that ensures data consistency between customer engagement apps (CE) and finance and operations (F&O) apps.

Customer engagement apps, such as Dynamics 365 Sales and Customer Service, focus on managing customer relationships, sales, and marketing interactions. These are process driven and can tailor to your customer's needs and business processes.

On the other hand, finance and operations apps, like Dynamics 365 Finance and Supply Chain Management, handle back-office functions such as financial transactions, inventory, and supply chain operations. These are more rigid applications because they fulfil a certain purpose and cannot be customized to the extent that a front-office app can be.

Historically, these two areas operated in silos, leading to data duplication and inefficiencies. Dual Write was introduced to bridge this gap, ensuring real-time data flow between the front office and back office, enabling businesses to operate with a unified and accurate data set across departments.

Key Benefits of Dual Write

  • Seamless Data Synchronization – Ensures that customer, product, and financial data remain consistent across systems.
  • Enhanced Business Processes – Provides a unified experience across sales, customer service, supply chain, and financial management.
  • Real-Time Updates – Improves decision-making by reducing latency in data updates.
  • Reduced Customization Efforts – Eliminates the need for complex custom integrations.
  • Improved Customer Experience – Ensures that all teams have access to up-to-date customer information, leading to better service.

Use Cases of Dual Write

  • Customer Data Management: Keep customer records synchronized between CRM (D365 CE) and ERP (D365 F&O), ensuring all departments have access to accurate information.
  • Product and Pricing Updates: Synchronize product catalogs and pricing details across sales, e-commerce, and finance platforms.
  • Order Processing & Invoicing: Automatically sync order details and financial transactions across systems to streamline the order-to-cash cycle.
  • Inventory & Supply Chain Management: Ensure accurate stock levels, purchase orders, and logistics data across finance and operations teams.

Technical Considerations

  • Customization and Extensibility: Dual Write supports custom tables and extensions, allowing businesses to tailor integrations to their needs.
  • Data Security & Compliance: Ensure that data policies and governance are in place to comply with industry regulations.
  • Performance Monitoring: Regular monitoring and performance tuning can help prevent sync failures and maintain optimal system performance.
  • Error Handling & Troubleshooting: Implement robust error logging and resolution mechanisms to address data conflicts or sync issues.
In conclusion, I see this as a game-changer for businesses using Dynamics 365. By using this organizations can achieve real-time data consistency and reduce costs. As companies adopt digital transformation strategies, dual write becomes a key enabler for a unified and connected enterprise.

Wednesday, December 13, 2023

Dual-Write | Update the Delivery Address in Sales Order from D365 Sales to F&O

We have Dual-Write enabled in one of our customer sites and we are syncing sales orders from D365 Sales to D365 F&O. The issue that we were facing is, when we update the delivery address in D365 Sales, i.e., on Order form (in CE), we have a field called "Choose Ship to Address", while the address is updated on the Order form (in CE), it doesn't update the delivery address in D365 F&O Sales Order form.

Note: for the Address integration to work via dual-write, you need to enable GAB (Global Address Book) app.

After some R&D, we cracked it.

We wrote a workflow to update the Delivery Address Location ID based on the address selected in the field "Choose Ship to Address".

Note: Delivery Address Location ID is also a field on the Order form in D365 Sales. By default you can see that under the Integration tab.

D365 CE Sales Order form

Below is the screenshot of the workflow that was created. Workflow to be created on the Order table and the trigger is when Choose Ship to Address is updated.

Steps:
Condition: if Choose Ship to Address contains data
Update: Delivery Address Location ID (Order) = Location ID (Address)


I am not mentioning the Dual-Write table maps here, but we were using OOB tables maps on the Order table. In case you have updated with custom table maps, you may want to check it (in case the address is still not updating).

Hope this helps!

Tuesday, October 17, 2023

Troubleshoot Dual-Write Issues in Dataverse and F&O Apps

I have written couple of articles on Dual-Write lately. Mostly on issues that we've been facing lately and how we have come to fix them. These post is where I bring them all together. You can think of this blog post as a summary of all the issues and fixes until now and will continue to update the same in the future.

Also certain topics don't need a separate post. Will write about them here directly. Starting below with the posts that I have written previously.

Previous Posts


Unable to create a Quote in Dynamics 365 Sales App

This was because we were receiving an error

"Write failed for entity CDS sales quotation header with unknown exception - BOX API can't be used from non-interactive sessions."

 Click here to read the post.


Privileges required for dual-write initial sync

There are certain security roles and privileges required to perform initial sync of tables via dual-write.

Click here to read the post.


Unable to delete postal addresses in Dynamics 365 Sales

This happened because there were related records, and I wasn't able to delete them too.

Click here to read the post.


Unable to create an order from a quote in Dynamics 365 Sales App

Here is the precise error that I was receiving.

"Write failed for entity CDS sales order lines V2 with unknown exception - Inventory dimension Site is mandatory and must consequently be specified.\nUpdate has been canceled."

Click here to read the post.


Other Issues


Unable to load the dual-write module in a Finance and Operations App

If you're unable to open Dual-write page by selecting the Dual Write tile in the Data management workspace, most likely data integration service is probably down.

For this you would need to create a MS support ticket and request a restart of the data integration service.

Thursday, August 17, 2023

Dual-Write | Unable to create Order from Quote in D365 CE Sales

While converting a Quote into an Order in D365 CE Sales, I was receiving an error message that went like:

Dual Write core application error-Dual Write core application error-Unable to write to Finance and Operations apps due to following error(s): {"Write failed for entity CDS sales order lines V2 with unknown exception - Inventory dimension Site is mandatory and must consequently be specified.\nUpdate has been canceled."} Please rectify your data and try again. If issue persists after multiple retries, please contact your system administrator.

Since dual write is seamless integration and data synchronization across D365CE and D365FO and as the default shipping site and warehouse is required while creating the Order in F&O, we need to ensure that the value is populated prior to creating the Sakes Order. 

Solution

While encountering an error can be frustrating, the good news is that there is a solution.

In this case, the remedy involves performing relationship mapping between the Quote and Order entities. Relationship mapping essentially defines how data is transferred between related entities.

Steps:

  • Open the solution in D365 Sales App. Ensure you've added the following components:
    • Quote and Order tables
    • 1:N relationship between Quote and Order
  • Open the relationship and click on Relationship Mapping
  • Add a new Map and select Default Shipping Site and Default Shipping Warehouse.
  • Now try to convert the Quote into an Order.
It should be smooth sailing now.

Hope that helps!

Friday, August 4, 2023

Dual-Write | Unable to delete Postal Address Collections in D365 Sales

If you're unable to delete Postal Address Collection records in Dynamics 365 Customer Engagement Sales App, most likely the reason is there is related Postal Address records under that.

When I try to delete Postal Address records using Advanced find, I couldn't find the Delete button on it. If I open the record (for Postal Address), still couldn't see the delete button.

I used Bulk Record Deletion job to delete Postal Addresses and then I could go ahead and delete Postal Address Collections.

What are these tables you ask? These are added when you implement dual-write and install GAB solution in the dataverse. If the 2 environments are in sync, it is best to delete these records in F&O and let dual-write handle the deletion in D365 CE Sales.

We were in a situation where the F&O environment wasn't in sync with CE and we had to remove these records manually in CE only.

Hope it helps!

Dual-Write | Privileges required for Initial Sync and other considerations

Recently we were doing an initial sync for tables between Dynamics 365 Finance & Operations apps and Dataverse (Dynamics 365 Customer Engagement), and we received an error that read:

Reason: Bad Request, Header x-ms-client-request-id 8aef8aa3-2a01-493e-a0d7-347ce560e50d, Principal team (Id=b7e1929e-xxxx-xxxx-aad0-xxxx489fxxxx, type=9, teamType=0, privilegeCount=0, MetadataCachePrivilegesCount=9751, businessUnitId=b5e1929e-xxxx-xxxx-aad0-xxxx489fxxxx), is missing prvReadmsdyn_globalproduct privilege (Id=539cf392-xxxx-xxxx-b258-xxxx719b7d93) on OTC=10835 for entity 'msdyn_globalproduct' (LocalizedName='Global Product') in Business Unit: unqxxxx (Id=b5e1929e-xxxx-xxxx-aad0-xxxx489fxxxx). context.Caller=691e1af2-xxxx-xxxx-aad1-xxxx489axxxx

Sometimes when you're excited and hurrying into the action, you miss the fine details and here are the fine details.

Security role that is required

Every user in a customer engagement organization with dual-write must be given Dual-Write Runtime User role. Without this role, users will be unable to create any rows in tables in customer engagement organization.

Company and currency exchange tables are global in nature and all dual-write users require read access to these 2 tables. To provide access, all dual-write users must be given Dual-Write App User security role. If a user does not have this security role assigned to them, they will not be able to read tables that contain Company and Currency.

Also access is required to entities (tables in dataverse) that are in scope of dual-write. However which privilege is required is not very clear. What you can do is to create a custom role and provide the relevant privilege to the tables in scope of your dual-write integration. We had provided Create, Read and Write which worked for us.

PS: I do believe Read privilege should be enough. Comment down below if you have an experience regarding the exact privilege required.

Here is the link to other considerations before performing initial sync & setup dual-write security roles and permissions.

Hope this helps!