Many interesting features are being provided by Microsoft for Audit log in the new version Dynamics 365. One of them is Deleting Audit history records. Yes, deleting audit history records through Dynamics CRM.
Earlier the user did not have the ability to delete audit history record. But now Microsoft has now provided a button to delete audit history records. It is just a simple click.
The button is seen on the Associated view of the record.
Suppose auditing is enabled for Account entity then the Delete Change History button can be seen as below:
On click of this button, a confirmation message is shown as below.
On confirmation, all the auditing log records are deleted and a record for audit log deletion is created.
Obviously, we would like only the System Admin or users with certain roles to have access to delete these records. This can be handled by giving privileges for the particular role.
Example – I do not want my Sales Manager to delete the audit log records. For this you do not need to give delete privileges to Sales Manager role under security role as shown below:
So, when a user with Sales Manager role log in to the system is not able to see the Delete Change history button.
With the new feature added in Dynamics 365, users will be able to delete audit log history records on the click of a button.