Microsoft Dynamics 365 provides a great way to track the changes made to customer data with its out of the box Audit capability. It logs the changes that are made to a customer record so that we can review those changes later .
The audit logs help the Dynamics 365 users / Administrator answer questions such as:
- The users who accessed the system and when?
- The users who updated records and when?
- The previous and new values of the field.
However, we also have some challenges with the out of the box Audit such as
- Inability to access the Audit entities
- Inability to do reporting.
- Inability to Search of Audit changes
- Inability to export the Audit records to Excel
I was going through the AppSource recently and I came across a solution by Microsoft Labs called “Actionable Audit” . It is a solution that provides the answer to all above mentioned challenges with D365 Out of the box Audit capability.
Before we proceed, this is a solution built by Microsoft Labs and I don’t think there will be an official support from Microsoft for this solution. I would use this solution to evaluate and understand different options we can have when addressing Audit related customer requirements.
Solution Overview
From what I have gathered by going through this solution is that ,this is a completly separate solution from the Out of the Box Audit functionality.
Basically every time a record is created , updated or deleted an Audit record is created on a custom entity called “Actionable Audit” or “msdyn_audithistory”. As per the blow screenshot you can see there are plugin steps registered for each event.
There are definitely pros and cons of this solution which I will discuss at the end of this article. For now, let’s look at how we can get the solution installed and configured in our CRM environment.
Installing
The installation and configuration is basically a 3 step process
Step 1: Installing the Addon from App Source
Step 2: Adding the Custom Web Resource to the Form to display the Audit Data.
Step 3 : Provide Security Access to the Custom Audit Entity
Installing the Addon from App Source
- In D365 Navigate to “Settings -> Dynamics Market Place “
- Search for “Actionable Audit”
- Click on the “Get It Now” button.
This will start the installation process and once complete you should see a new solution installed.
Adding the Custom Web Resource to the Form to display the Audit Data.
By default, when the solution installs the new Audit functionality will be enabled for Contact, Account, Opportunity and Case. If the functionality is to be enabled for a different (Custom or System) entity, the process will be explained later in this article
- Navigate to the desired entity form in my example I am using the Account entity
- Insert a Web Resource with the name “msdyn_ audithistory”
- Save and Publish the form changes.
Once you open a sample record you will see the Audit history . You will have the ability to search for Audit records and Export Audit records to excel.
Provide Security Access to the Custom Audit Entity
- Navigate to the desired Security Role and ensure you give the appropriate Privileges to Read / Write data into the Custom Audit Entity.
Extending
Create
Enter the following details and click on Register New Step button.
- Message: Create
- Primary Entity: “Select desired entity”
- Event pipeline stage: PostOperation
- Execution mode: Asynchronous/Synchronous based on business requirement
Post Image
- Name: PostImage
- EntityAlias: PostImage
Update
For update operation register the step as per create operation and provide the following details and click on “Register New Step”.
- Message : Update
- Primary Entity : “Select desired entity”
- Event pipeline stage : PostOperation
- Execution mode : Asynchronous/Synchronous based on business requirement
Post Image
- Name : PostImage
- EntityAlias : PostImage
Pre Image
- Name: PreImage
- EntityAlias : PreImage
Delete
For delete operation register the step as per following details.
- Message : Delete
- Primary Entity : “Select desired entity”
- Event pipeline stage : PreOperation
- Execution mode : Synchronous
Pre Image
- Name: PreImage
- EntityAlias : PreImage
Considerations
While this solution provides a new and different way of auditing your D365 data, there are few considerations that needs to be taken into account
- This new solution is not linked or an extension of the out of the box D365 Audit function. The Solution simple adds a plugin on Create, Update and Delete of records that create an Audit Record in a Custom Table “Actionable Audit”
- The solution creates audit record for individual field that is update on the record. Which can result on a VERY LARGE Audit Table
- There solution does not have a process to Archive Audit Record. Therefore, maintaining Audit Logs should be done manually.
- Despite of the above considerations I do like the UI the solution provides where I can search for Audit records and the ability to export the Audit files to Excel.