A Lesson in Bulk Deletes and Selectively Restoring Data in Dynamics CRM

We developed a Dynamics CRM Solution for an enterprise-size client that leverages E-mails, Cases, and Queues in the Service Module.  The client has users and customers worldwide.  A user accidentally ran a bulk delete job and deleted over 62,000 Email Activities from the CRM database.  This is not an action that users typically have permissions to run, but this user was mistakenly assigned the wrong security role and hence had the ability to run the bulk delete job.

We could not simply perform a Data Restore as a week had already passed by the time the client discovered the missing E-mails.  If we performed a Data Restore, we would have lost the current week’s worth of data.  So we developed a plan to restore the specific deleted E-mails.

The Audit History table cannot be queried via Advanced Find; however, there exists an Audit Summary View (Settings -> Auditing -> Audit Summary View) that contains data that can be filtered by such columns as Date, Event, Changed By, and Entity. In our case, we filtered by Event = “Delete” and Changed By = User that deleted and found all of Email Activities that were accidentally deleted. This data can also be found in the SQL Base Table “AuditBase”.

We were able to restore the deleted Email Activities by importing from the AuditBase Table. In addition to the import, we had to update a number of fields through SQL Update Statements to reflect the original values rather than the values of the import:

  • Created By
  • Created On
  • Modified By
  • Modified On
  • Sender

Furthermore, we had to import the Attachments that were associated to the Email Activities as well using an INSERT INTO SQL Statement.

Although initially an extremely frightening discovery, the recovery process went really smoothly and the tool was back in order over the weekend.  So, routinely verify your User’s security roles!

Phone: 312-602-4000
Email: marketing@westmonroepartners.com
222 W. Adams
Chicago, IL 60606
Show Buttons
Share On Facebook
Share On Twitter
Share on LinkedIn
Hide Buttons