Audit history data missing in Dynamics CRM

Recently in one of the CRM 2013 On-premises UAT environment, observed that all of a sudden Entity Audit Stopped for OOB Case entity and was not able to see New Value data in Audit History as well, instead saw a symbol.

Below is the screenshot for reference.

After a long time investigation, found that this was the problem with Audit records, created on Audit Change at Entity Level and Disabled Events on Case entity.

Ran the below query against the required database.

SELECT 
AuditId,
ObjectId,
[Action],
AttributeMask,
ChangeData,
ObjectTypeCode
FROM AuditBase
WHERE
[Action] = 102 -- Audit Change at Entity Level
AND ChangeData = 'TRUE' -- For Disabled Events
AND ObjectTypeCode = 112 -- Case Entity Object Type Code
ORDER BY CreatedOn DESC

Got some records in AuditBase table.

Ran the below query and deleted the records from Auditbase table and it resolved the problem.

Note: Take the back up of the CRM Database before performing delete operation.

Delete from 
AuditBase
WHERE Action = 102 AND
ChangeData = 'True' AND
ObjectTypeCode = 112

Refreshed the required case record and was able to see the New Value data in the Audit History.


Advertisement

3 thoughts on “Audit history data missing in Dynamics CRM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.