Setting up the dev process: can we automate configuration change tracking?

By | June 13, 2018

 

It’s not unusual that we need to know what has changed since the last time we did anything in the Dynamics environment. As I mentioned in the previous post, we have some manual and half-manual options, but it would be nice to have a bit more automation there.

For example, there is a change log screenshot below – if we could get that kind of change log created automatically, that might be a good start:

The solution below is based on the original CRM Comparer tool:

https://docs.microsoft.com/en-us/previous-versions/dynamics-crm4/developer-articles/dd442453(v=crm.6)

Which had a reincarnation here:

https://archive.codeplex.com/?p=crmcomparer

And I just uploaded it (with some changes) to github:

https://github.com/ashlega/CRMComparer

It’s possible that the tool will not recognize some of the newer solution components (such as applications, for example), but we can work on that later.

If you follow setup instructions from the link above, you can, basically, do the following:

  • Configure the tool to connect to your instance of Dynamics
  • Create a solution in Dynamics and add all components you are interested in to that solution (make sure to keep maintaining the solution moving forward)
  • Create a scheduled task to run the following command periodically: ChangeTrackingTool.exe SolutionName

 

Every time that scheduled task runs, the tool will go to Dynamics, download the solution, and compare the contents of that solution with what was downloaded previously.

For example.. If you look at the screenshot above, you’ll see that ita_firstentity was created that time. Now let’s go to the solution in Dynamics, let’s add an attribute, and let’s put it on the form:

Here is how the form looked like before:

And here is how it looks like after adding another attribute – notice New Attribute on the form:

So now let’s start the tool and see what happens:

It does take a little bit to do the comparison, but, in the end, here is what shows up in Dynamics:

1. There is a new change log for the “TrackingTest” solution

2. And, if I open that record, I can see the details

In other words:

  • A new attribute on the ita_firstentity was created (ita_newattribute)
  • Information Form for the ita_firstentity was updated
  • And, more specifically, a row was added to that form

 

And what kind of row was that? Let’s open that particular component record:

If you ever saw customizations.xml, that XML on the screenshot should look somewhat familiar, since, basically, it’s part of the customizations.xml.

So give it a try – let me know what you think!

Leave a Reply

Your email address will not be published. Required fields are marked *