DualWrite Filtering

As I have mentioned before I am currently involved in implementing DualWrite with a customer and in this case there is data in CRM and FnO that we need to work around.

One example is a “single” contact that is used in multiple companies as an EDI adress. The reason I wrote “single” is that since we in FnO use the Global Adress Book, the contact is one Party that is instancuated as a contact in each of the Customers that are using it. This means that if you look in All Contacts there are a whole bunch of Duplicates.

These contacts are then synced, using DualWrite, to CRM… much to the annoyance of my CRM colleagues. This contact is of no use in CRM and I was asked to create a filter for them.

What i did was to set the field “Profession” in FnO (this was not being used) to EDI end then I added the following to the filters for Customer Contacts in DualWrite

FnO: (AssociatedContactType = 0) && (EMPLOYMENTPROFESSION != “EDI”)
CRM: msdyn_contactfor eq ‘Customer’ and msdyn_sellable eq false and msdyn_contactpersonid ne null and jobtitle ne ‘EDI’

As you notice, the syntax for the FnO and CRM sides is very different and that was the main reason I wrote this post. I needed a place to document the syntax 🙂

Links

Filter Not Working in FO side for Dual Write (dynamics.com)

Handling internal Vendors in DualWrite

At the moment I am involved in a DualWrite implementation between FnO and CE. The goal is eventually to be able to generate Quotes from CE and have them sync to FnO. As you might know there are a lot of entities required to get to the point where we can sync Quotes and one of the is Vendors V2 and another is Released Procucts. In order to sync Release Products we first need to have Vendors.

At this customer they are buying a lot of their products from an internal vendor (aka another Legal Entity of the same FnO instance. When we first synced Vendors, everything worked perfectly, with 100% completion, (as far as we could see) but when we tried to synd Released Products we were missing Vendors

Quite a lot… So digging into this we found that these Vendor were never synced, which we found a bit strange (remember 100 % completion.

Turns out there is a filter in DualWrite that looks like this and apparently internal Vendors are not of the type Organizations… They are LegalEntity

So with some modifications… it looks like this

But there is another thing we need to fix… We need to add the following line in the tranform rule

Once that is done, I force another Initial Sync of Vendors and once that is completed I could successfully sync Products… Yay !!

Issues syncing Sales Order Lines with Dual Write

I am doing some experimenting with Synapse Links for Dataverse and to do that I need my FnO data in Dataverse. The way I do it, is using Dualwrite. When I try to sync Sales Order Lines V2 to salesorderdetails I get the following error:

Reason: Bad Request, Header x-ms-client-request-id f1004256-8a98-42fe-86a9-02b8e64a81a9, Produkten kan inte läggas till eftersom den inte är aktiv

(for those of you, not fluent in Swedish it says “The product cannot be added because it is not active)

This means that the product is synced but it is not active. To activate the product it needs to be published. To do this go through the following steps:

  1. In Sales open products
  2. Select a product and click Publish

The problem was I had a couple of thousand products. So I googled and found this forum thread helping me to write a workflow to automate it (this is way beyond my knowledge in CRM).

Links:
https://learn.microsoft.com/en-us/dynamics365/sales/publish-product-bundle-make-available-selling
Bulk publishing products – Dynamics 365 Sales Forum Community Forum

Figuring out DataVerse and DualWrite in Dynamics 365 FnO

This is a (probably the first) post to try to sort out my experiences around setting up a DataVerse connection to a Finance and Operations environment and figuring out how this interacts with Power Platform Admin Center, LCS and DualWrite.

Background

DualWrite is Microsofts go-to solution for integrating Dynamics 365 CE and Dynamics 365 FnO. It uses Dataverse and PowerPlatform extensively which means that we are, in all essences, merging two separate products into one, which creates some challenges.

Since Microsoft is in the middle of a “Convergence” transition when it comes to managing these things I realize that this is a moving target at the moment, which is why I will need to come back to this this eventually.

This article will address some of the challenges that we have experienced, setting up DualWrite.

Since my primary focus is FnO I will start there.

There are a lot of clues to the fact that Microsoft sees PowerPlatform and DataVerse as an integral part of Dynamics 365 for Finance and Operations. The first one you will notice is that you get the option to create a Power Platform environment when you create a new FnO environment. Another lead is that none of the microservice add-ins that you can deploy from LCS are available to deploy it you have not connected your environment to Power Platform.

There are two different ways to create the DualWrite setup. Setting up a new, empty Environment when deploying a new FnO environment or linking your FnO environment to an existing CRM/CE environment. Please remember that, if you have an existing CRM environment with existing customizations (of a highly customized FnO environment) you should probably think about setting up a proof of concept to evaluate how to handle customizations. Keep in mind that the out-of-box mappings for DualWrite are created for vanilla environments.

Initial Setup

When setting up a new Finance and Operations environment you get the option of also setting up a new connected DataVerse environment. You will not get the option to connect an existing environment. You are able to opt out of this setup at the time of deployment if you want.

Regardless of what you choose the environment will be created and connected from the Power Platform side. On the LCS side there is no indication of any DataVerse environment.

Connecting to PowerPlatform

NOTE: This decision is IRREVERSIBLE. Once you have linked your FnO environment to a Power Platform environment there is no supported way to unlink it.

Once the environment is set up LCS offers an option to set up the DataVerse Connection. You can use the one provisioned for you, if you are not using CRM or if you are not planning to use DualWrite to interface with CRM, or you can link it to your existing Dynamics 365 for Sales (CRM) environment. Even though the connection is done to your existing/live CRM environment the operation should be safe since the Power Platform are being deployed to another “partition” of the environment. I know, the message in the upper right corner looks a bit scarry…

This operation only enabled the install of add-ins, DualWrite still needs to be set up from within FnO when you are ready for it.

Lessons Learned

Since Microsoft is currently moving the management experience of Dynamics 365 for Finance and Operations environments to the Power Platform Admin Center, all of this is a changing scenario and I think what we are seeing is a transition to what is about to come.

Key Take-Aways

  • Do a gradual rollout, starting with some entities
  • If there is data that does not need to be synchronized, a different solution such as virtual entities or PowerApps could be an idea
  • Do a proof-of-concept to validate the setup

Links:
Enable integration during environment deployment
Microsoft Power Platform integration with Finance and Operations apps – Finance & Operations | Dynamics 365 | Microsoft Docs

Warning:[DWCE0001] Export was skipped. Max lookup count supported in Initial Sync stage is 10. Current lookup count 11

Today I was setting up the Dual-Write sync for one of my customers and I bumped into this error message:

Warning:[DWCE0001] Export was skipped. Max lookup count supported in Initial Sync stage is 10. Current lookup count 11

The issue here is that there is a limit in DataVerse that (I would guess) for performance issues there is a hard limit on a maximum of lookup fields.

In our case we had these fields in the default mapping for Customer V3 -> Account using lookup:

transactioncurrencyid.isocurrencycode
msdyn_customergroupid.msdyn_groupid
msdyn_billingaccount.accountnumber
msdyn_paymentday.msdyn_name
msdyn_customerpaymentmethod.msdyn_name
msdyn_paymentschedule.msdyn_name
msdyn_paymentterm.msdyn_name
msdyn_vendor.msdyn_vendoraccountnumber
primarycontactid.msdyn_contactpersonid
msdyn_salestaxgroup.msdyn_name
msdyn_company.cdm_companycode

The workaround is to remove one of the problematic mappings, do the initial sync and add it back. Remember to take a screenshot of the mapping that you are removing so you can put it back exactly the same.