Following the Trail: Improved Auditing of CRM 2011

Article Author(s): 
Dustin Domerese

System auditing is a much requested and previously difficult feature to implement in Microsoft Dynamics CRM. In Microsoft Dynamics CRM 4.0 system auditing could be achieved, but in a limited fashion, through the use of an audit plug-in available from CodePlex or by the use of custom audit entities to hold the logs and a set of workflows to capture the events to be audited for a record. Since the release of Microsoft Dynamics CRM 2011, Auditing is much simpler and much more functional than ever before through the use of the audit tools included in the core Microsoft Dynamics CRM platform. It is now very simple to enable auditing, define how auditing should function for the organization, and view the audit activity in the application.

Manage Auditing

The Audit features of Microsoft Dynamics CRM 2011 are managed in the Settings area of the CRM organization by choosing System and Auditing. Start or stop auditing from within the Global Audit Settings section. Once the Start Auditing check box is checked, administrators have the ability to select the groups of Entities to enable for audit. This is intended to be a starting point for the entities and fields that to audit. Administrators can choose to audit Common, Sales, Marketing, or Customer Service Entities. Hovering over the title of a section (I.e. Common Entities), a tooltip appears showing the record types that are included for auditing on this section. By default this enables Auditing for all of the listed entities in that section and all fields in those entities.


As a best practice, only enable the fields that the organization would like to audit


Once the Start Auditing box is checked, administrators can manually enable auditing for the record types to audit rather than enabling audit for an entire section such as Common Entities. As a best practice, administrators should only enable auditing on the entities and the fields where changes should be tracked so that when viewing logs only see the ones relevant to the organization are seen.

Understand Limitations

One current limitation of Microsoft Dynamics CRM auditing is that Metadata change cannot be audited. That means if an administrator makes a customization to Microsoft Dynamics CRM this is not currently captured in the audit logs without making some customizations to capture this type of system level change. Another limitation is the ability to capture the reading of data. Without doing some development there is not currently a way to log the reading of a record. However, the checkbox for Audit User Access can be used to Audit a user logging into Microsoft Dynamics CRM including for how long and from which client. This can be valuable if a simple usage report is needed.

Auditing Settings

Modifications to the entities or fields that are enabled for auditing are made through the Settings and Customization area of Microsoft Dynamics CRM or by clicking on the Entity and Field Audit Settings link at the bottom of the Global Audit Settings page. Auditing can only be enabled or disabled on an entity in Microsoft Dynamics CRM by navigating to the entity definition in either the default or an unmanaged solution. The entities that are enabled for auditing are viewed by looking at the Audit Status column in the Entities view under the solution. To make changes, simply select the entity to enable or disable auditing and check or uncheck the Auditing box under the Data Services section of the Entity settings.

When an entity is enabled for Auditing, by default, Microsoft Dynamics CRM will enable auditing for all fields within that entity. This includes the tracking of any data changes made to fields that may or may not be on the Microsoft Dynamics CRM form. As a best practice, only enable the fields that the organization would like to audit. Keep in mind that any entity and field that is enabled for auditing will impact performance to the system in some way. Limiting auditing to only the fields and entities that are needed will improve the performance and efficiency of the Microsoft Dynamics CRM system. The setting for auditing of a field can be managed in the same way as the settings for auditing entities. Select the

Fields section under the entity and see the status of the field by looking at the Audit Status column of the field. The audit status can be changed by clicking the Edit button in the Fields toolbar and then selecting Enabled or Disabled for the Auditing Property. Change the status of multiple fields at one time by selecting the fields in the Fields view and clicking the Edit button in the toolbar. This displays a dialog that allows an administrator to Enable or Disable all selected fields at once.

 

Limiting auditing to only the fields and entities that are needed will improve performance and efficiency


View Audit Information

Once Auditing is enabled for the organization, view the Audit Log for the entire organization by navigating to the Audit Summary View section under Settings and Auditing. This displays all of the audit events that have occurred for any of the entities and fields that are enabled. From this view, see the Date and Time that the change occurred, what user account made the change, to which entity the change came from, and what type of operation was logged (such as Create, Update, or Delete.) Note there will be several instances where the user that made the change is "SYSTEM". This is the case for Microsoft Dynamics CRM processes that run without a user’s involvement (such as Sales Goal Calculation or Rollup Query execution.) Administrators also have access to the details about the change such as what field changed and what the old and new values of that field were by opening the audit record. This same detail is also available at a record level for entities that are enabled for audit. Access this by opening a record and clicking on the Audit History link on the left navigation of the record. This shows the same detail as the Global Audit Log, but limits the view to only activity regarding that record.

Configuring Microsoft Dynamics CRM for Auditing is now easier than ever before. Well informed administrators and managers can make simple decisions on the configuration and put this important functionality in place by using the tools provided right within Microsoft Dynamics CRM.