We’ve all seen it many times in our projects.. Being under pressure to close these last P1 and P2 bugs by making some quick config changes in UAT, we forget to keep a record of what we did and to bring this into our Golden Config environment. And then, after cutover to Production, our users are confronted with the same issues as before.. How great would it be if we can prevent this with an extra ‘lock on the door’?
Dynamics Versions
The method of comparing configuration between D365FO environments as described below is utilizing D365 Data Management capabilities. If you’re still working with AX2012 you’d also be able to apply most of it with DIXF.
How it’s done
STEP 1: Represent your critical configuration areas in a D365 Data Template
We all know our ‘sensitive’ setup areas which can give real trouble when not 100% identical in the various D365FO environments – Areas such as Financial dimension values, Tax setup and module parameters. To have a good starting point for your Config ‘lock on the door’, ensure to represent these areas by Data Entities in a D365 Data Template which you could for example name “D365_Setup_Compare”:
Export this template into a SharePoint library for easy re-use and version control.
STEP 2: Create Export Data Projects in your D365FO environments
Create an Export Data Project on the basis of the Data Template from SharePoint and pick “XML Element” and “Data Package” for the output format. As per best practice, suffix the Data Project with the name of the environment for easy identification later. Note that in case you have many D365 FO environments to continuously apply updated Data Templates to, you could consider Data Task Automation.
STEP 3: Save the files in a central location
Create a folder structure in a central location. If you use SharePoint as a baseline, then open the respective Document Library in OneDrive to allow sync to local folders. Then, run the Export Data Projects in the various D365FO environments, download the packages and extract them into the folder structure:
STEP 4: Install and configure Altova diffdog
To quickly compare Configuration from D365FO environments by the XML files we’ve exported, I prefer using a tool called Altova diffdog. Although the tool is not free (one-time EUR109/USD139 for a license), I think it’s worth the investment looking at the excellent way this tool highlights any differences at a glance – We’ll come to that below. First, download and install the tool (on a trial license) and configure as follows:
- Click File>Compare Directories and select the directories to compare
- Tick Compare as XML and untick Quick to let Diffdog perform a detailed comparison of the files in the directories – This is done in seconds
- The tool then highlights the differences as per color coding as you can see in the example below.
- Click File>Save as and define a file name which is representative for the comparison, such as “D365 UAT vs PROD”. In this way, you can have multiple comparisons open as different tabs in Diffdog.
A click on any of the colored rows which represent differences, will give you the details. Switch to Grid View for the best experience:
Further ideas
If you want to make this a fully automated process which is re-usable for any other project, I’d recommend the following:
- Utilise D365 Data Task Automation to automate the creation of “D365_Setup_Compare” Data Projects and their Data Entities representing core Setup Areas to compare. In this way, you can centrally maintain your project definitions in your LCS Shared Asset Library for easy re-use in all your Projects.
- Introduce automatic updates of the XML files in the SharePoint folder by setting up D365 Recurring Data jobs for the “D365_Setup_Compare” Data projects and configuration of a Microsoft Flow to automatically dequeue, download and unzip the content of the packages into your central SharePoint folder.
Hope this ‘lock on the door’ saves us all a lot of frustration..!
Patrick
Jim
juni 19, 2019 @ 10:59
Hi, Thank you for this. I’ve hit a snag though – when I open click on the xml files in diffdog (the last image in article) I’m not seen any of the data, only the headers. Can you think what I might be doing wrong?
When you say: ‘Create an Export Data Project on the basis of the Data Template from SharePoint and pick “XML Entity” and “Data Package”’ in Step 2 did you mean to say “XML Element” (or Attribute)? Many thanks
Patrick Mouwen
juni 19, 2019 @ 11:28
Hi Jim,
“XML Entity”should be “XML Element” indeed. I’ll correct that – Thanks.
To come back to your question: if you only see headers it seems like D365 did not output any data (only the headers) or you instructed DiffDog to parse the file as XML while the structure isn’t like that?
Let me know if this helps.
Patrick
Jim
juni 19, 2019 @ 13:22
Thank you for pointers Patrick, I will let you know how I get on and share what I’ve been doing wrong – once I’ve worked it out 🙂
Jim
juli 5, 2019 @ 16:16
Hmm, well – been banging my head against this brick wall for last couple of weeks, learning a lot about all aspects of Dynamics, but no dice with trying to get my configs compared. Given that we lost a load of configs (and a couple of weeks of work) in the last data migration I think we’ll need to get an expert in at this point (do you do remote sessions?). Would be really nice if our implementer was able to guide us on this, but ho hum. I will post back if I ever get this to work for our environments.