Auditing Automatically Disabling with Unmanaged Solution Deployment in Dynamics 365

Jordan Hohepa, 17 May 2017

Recently while attempting to view audit data I was surprised to see that values in the "New Value" column had been replaced by a weird symbol, which can be seen in the screenshot below. I found that it was a common problem which would occur when auditing had been turned off. After checking and confirming that auditing was still enabled, I decided to look into this more.

image

Through further investigation, I found that auditing can automatically be disabled and then re-enabled when a managed solution is deployed. From here I checked when the entity level auditing had been disabled and tried to match that date and time with a solution import. By doing this I found that it was disabled when a solution was imported, but this solution was unmanaged not managed.

It turns out that the issue is caused by not ticking the ‘Include entity metadata’ checkbox when deciding which entity assets to add to a solution. While deploying the solution without that checkbox ticked CRM attempts to revert the entity settings back to their default.

image

In the example below, the custom entity did not have auditing enabled when it was created so its default setting for auditing is for it to be disabled. When deploying this entity in a solution without that metadata box ticked, CRM temporarily disables the auditing, as this was the default, then re-enables it, because that is its current state.

image