Industry and services
The ideal digital transformation partner is not only an expert in theory and technology but also in its customer’s industry. Our consultants are familiar with the processes, priorities and challenges of these eight focus industries.
Contact us
Manufacturing companies
proMX has long been focused on supporting manufacturing companies with their digital transformation.
proMX services
proMX helps you tackle challenges by analyzing your processes and customizing your system with tailored solutions. In our discovery workshop, we'll pinpoint the right tools to boost productivity. Let’s get started!
This might be useful
Partners
Partnering with proMX Group to offer the proMX 365 Productivity Suite provides a unique opportunity to enhance your business portfolio and drive significant growth.
Become a Partner
Our mission
All companies strive to digitalize and optimize their processes, and thus become more productive.
About us
proMX is your digitalization partner. Our goal is to help you transform your processes to make your business more agile, efficient and competitive. As a Microsoft Partner we are both extremely experienced and well-connected.
More about proMX
Our mission
All companies strive to digitalize and optimize their processes, and thus become more productive.
Florian Ludwig
Apr 26, 2016 | Last updated: Dec 16, 2022
Expert articles | 3 min read

A few weeks ago, I made a thoughtless mistake in data synchronization between the ERP and CRM systems. A request was made for synchronization to delete CRM records based on an ID. Nothing special so far. I developed my code for deletion, tested it with different entities and made a rollout. Unfortunately, there was one scenario that I forgot to test. Thus, my code deleted the wrong records.

After a short panic attack, I tried to figure out which records were deleted. Since we are dealing with CRM Online, it is not possible to take a look into the database. So what else could I do? Then, I found out that the Audit for deletion is more powerful than I thought.

Step by step: restore your deleted records from the CRM system

Audit summary view

For a moment, it looked like “Oh CRM audited that I deleted a very important lead.” Later, I figured out that the record might not be available as an existing record, but the information of all audited fields was still there:

Overview of all audited fields

So, I started searching for a way to get this information. In the CRM SDK I found the RetrieveAuditDetailsRequest. This Request requires only the audit Id to get the audit details. Therefore, you first have to query for audits. In my case: leads deleted on 2/4/2016.

RetrieveAuditDetailsRequest in the CRM SDK

After that, you have to execute the RetrieveAuditDetailsRequest with the Id of the audit entity previously queried. The RetrieveAuditDetailsResponse contains the AuditDetail, which being casted to AttributeAuditDetail, contains the deleted Entity as OldValue property.

Information stored in the AuditDetail

Now, you can do what you have to do with this information, e.g. restore the data via creating the old value again.

I think with this knowledge it is pretty easy to restore deleted data in CRM. Very important in this context is of course the enabled auditing. Furthermore, fields which are not enabled for auditing will not be restored either.


If you’re looking to solve one of the most common issues seen in CRM customization, namely deleting obsolete fields in the productive system (managed), you’ll find your question answered in this article.

Answering