Hi and welcome to my first blog post. It's taken me a while to finally get around to doing this, and I'm hoping some of this information will help others on their learning journey.
I've been working with Dynamics 365 for around 9 years across both D365 CE and Finance & Operations projects. I'm lucky enough in my role that I get to work on enterprise projects that span across D365 Customer Engagement and Finance & Operations applications.
There seem to be a lot of blogs, tech talks and videos around the technical infrastructure aspect of Dual Write but very little around the application and how introducing this into Dataverse impacts the data model and first party D365 applications.
The Challenge(s)
How can new or experienced D365 CE Consultants/Solution Architects or that have refined their skillset for years, and are well respected experts in their own field be expected to know the finer details and things to look out for when working on a combined CRM / ERP implementation? What about users who aren't consultants that want to learn, how can they do so? What if you don't have any knowledge in Finance & Operations?
All these are valid challenges and the aim of this series of blog posts is to help users on their learning journey and provide an environment to work in and more detail around some of the changes that occur from a functional perspective and how your traditional way of thinking needs to change and adapt. Part 1 will cover getting an environment up and running before we delve into concepts, functionality and gaps in subsequent parts.
Environments
So you are probably thinking don't we need a connected environment to do this?
Well that would be true if we were looking to test the actual integration, but our goal is to get familiar with the changes rather than transfer data across systems. It's true that the connected environment would be the eutopia but there are certainly lots of things we can learn without it, so lets get started.
Installing Dual Write Solutions
We will start the journey assuming that you have a new environment. In Power Platform Admin Centre navigate to Resources > Dynamics 365 Apps
Here open App Source using the button on the command bar and in the search bar enter Dual-Write. Here you can look to install the relevant solutions.
For the purpose of this and subsequent blogs we are going to be installing the four solutions below in sequence as there are dependencies.
Dual-write Core Solution
Dual-write Application Core Solutions
Dual-write Application Orchestration Solution
Dual-write Party and Global Address Book Solutions
Note: The Dual-write Application Orchestration Solution has been split into smaller solutions which should be assessed to see if these smaller packages are more suitable. It is also possible to go without the Party & GAB Address Book and have a simplistic integrated customer/vendor master scenario if this is more suitable.
To install each one, click Get it Now and you will be presented with the below screen.
Click Get In Now once more and you will then be presented with the below screen.
You will then need to select your environment, tick the two checkboxes to agree to the relevant terms and conditions before clicking Install.
Repeat these steps for each solution and then take a break for an hour or so whilst these install.
Site Map Update
The first step is to create a new solution in your environment and update the application that you are using to include two new entities/tables named:
Party
Vendor
I would personally add these to the Customers group, we can talk around Vendor in more detail in subsequent blogs. The end result should be something similar to the below screen.
Duplication Detection Rule Update
In Dataverse, the duplicate detection rules character limits have increased from 450 to 700 characters. This limit lets you add one or more keys to the duplicate detection rules.
Add the duplication detection rule named Accounts with the same Account Name to the solution, you will need to unpublish the rule, make the updates as per the screenshot below before re-publishing.
As you will notice we are introducing the Company, Relationship Type and Party ID to the rule criteria.
Now add the duplication detection rule named Contacts with the same first name and last name to the solution, again you will need to unpublish the rule, make the updates as per the screenshot below before re-publishing.
Creating a Company: Failing & Investigating
Companies are the Dataverse terminology for what Finance & Operations refers to as Legal Entities. When we use Dual Write these are mastered in Finance & Operations, and provide a single direction data integration.
We will start with a couple of amendments to the solution we have already created. Add the Company table to the site map.
Then we need to make a modification to the out of the box Information form on the Company table. The column we need to add is Is Enabled for Dual Write, do a save as (as per best practices) and save the form with a suitable form name and publish. Remember to remove the original Information form from the solution.
We will now try to create a Company Record and ensure the Is Enabled for Dual Write is No
You will then get an error message as per the below screenshot.
If we take the first part of that error message.
OrganizationServiceFault Microsoft.Xrm.Sdk.InvalidPluginExecutionException: "The user cf234837-1633-ee11-bdf5-0022481b5025 cannot write data to this table, only the integration users may write data to this table."
This makes sense, Microsoft have restricted the creation of Company records in Dataverse which makes complete sense in an implementation but doesn't help us in our goal of becoming more familiar with the changes.
If we look at the error message in full we will see plugin steps being referenced.
OrganizationServiceFault Microsoft.Xrm.Sdk.InvalidPluginExecutionException: "The user cf234837-1633-ee11-bdf5-0022481b5025 cannot write data to this table, only the integration users may write data to this table." at Microsoft.Dynamics.FOCommon.Plugins.Services.ReadonlyEntityService.PreModify(LocalPluginContext localcontext) at Microsoft.Dynamics.FOCommon.Plugins.PluginBase.Execute(IServiceProvider serviceProvider)
So the offending plugin step is named as below:-
Microsoft.Dynamics.FOCommon.Plugins.Services.ReadonlyEntityService.PreModify
So lets go ahead and add this plug in step to the solution but before we do lets search when adding this for the below term.
Microsoft.Dynamics.FOCommon.Plugins
In the screen above you will notice that I've highlighted two plug-ins, one for create and one for update.
Microsoft.Dynamics.FOCommon.Plugins.ReadonlyEntityPreModify: Create of cdm_company
Microsoft.Dynamics.FOCommon.Plugins.ReadonlyEntityPreModify: Update of cdm_company
Add these to the solution and ensure that these are turned off. The solution should look like the below.
Creating a Company: Succeeding
So now lets go ahead and try again to create a Company Record and ensure the Is Enabled for Dual Write is No
So lets check that has all worked correctly and check a Business Unit has been created in line with the example diagram below, more details can be found here
So no Business Unit has been created and likewise no teams have been created
So what is going wrong here? Remember that Is Enabled for Dual Write option that we set to No lets go back and change that to Yes.
If we go ahead and check the Business Units again you will see that the Business Unit has automatically been created and if we also check the teams, two teams have been successfully created.
The Outcome
So we now have a Company record in the system and available to use, which means we can now successfully create Account and Contact records without an error and become more familiar with the changes that the Dual Write solutions bring. Other data will be required to create certain record types and this master data will be covered in Part 2.
I would suggest that a handful of Company records are created for familiarisation purposes. Once complete remember to turn the plug-in steps back on.
I hope you have found this first blog useful and join me for part 2 shortly, where will will start on our familiarisation journey.
Thanks for reading.
Cover Image: Photo by ThisIsEngineering:
Comments