Question Status

Verified
Ben Markland asked a question on 4 Feb 2015 12:05 PM

I am using MSCRM 2013 On-Premise and have a deleted record I need restored.  This is a custom entity and has custom child entities as well.  Is this possible?

Thanks

Reply
Verified Answer
Chitrarasan Duraisamy responded on 4 Feb 2015 12:17 PM

There is no way to restore deleted record until you have database back with that record.

If you have database backup restore the database and use SDK to push that record back to CRM or export to excel and import into crm.

Chitra


Reply
Verified Answer
Damon (nomad) responded on 4 Feb 2015 12:34 PM

Ben:

Sorry there is no way to recover a deleted record.  If you have a db back system you should be able to recover.

Confirming with Chitra post.

Thanks

_damon

Reply
Verified Answer
Mahadeo Matre responded on 4 Feb 2015 12:53 PM

Hi Ben,

There is one way to restore your deleted record, if you have auditing enabled for this entity.

CRM stores auditing in Audit table

Following query is giving all deleted contact records from system.

select * from Audit where Operation=3 and ObjectTypeCode=2

Here Operation =3 means Delete operation, and objectTypecode =2 is for contact..

To get objectTypecode for your entity you can do query

select * from Entity where name like '%test%'

-- replace test with your entity schema name.

but to get data from auditing table is not easy.. you need to do lot of SQL manipulation and then you can get actual data..

Here is example to get data from audit and create report.. you can use similar approach and get data for that entity.

community.dynamics.com/.../dynamic-crm-2011-2013-audit-report-in-ssrs.aspx

Hope this will help..

Reply
Verified Answer
Chitrarasan Duraisamy responded on 4 Feb 2015 12:17 PM

There is no way to restore deleted record until you have database back with that record.

If you have database backup restore the database and use SDK to push that record back to CRM or export to excel and import into crm.

Chitra


Reply
Verified Answer
Damon (nomad) responded on 4 Feb 2015 12:34 PM

Ben:

Sorry there is no way to recover a deleted record.  If you have a db back system you should be able to recover.

Confirming with Chitra post.

Thanks

_damon

Reply
Verified Answer
Mahadeo Matre responded on 4 Feb 2015 12:53 PM

Hi Ben,

There is one way to restore your deleted record, if you have auditing enabled for this entity.

CRM stores auditing in Audit table

Following query is giving all deleted contact records from system.

select * from Audit where Operation=3 and ObjectTypeCode=2

Here Operation =3 means Delete operation, and objectTypecode =2 is for contact..

To get objectTypecode for your entity you can do query

select * from Entity where name like '%test%'

-- replace test with your entity schema name.

but to get data from auditing table is not easy.. you need to do lot of SQL manipulation and then you can get actual data..

Here is example to get data from audit and create report.. you can use similar approach and get data for that entity.

community.dynamics.com/.../dynamic-crm-2011-2013-audit-report-in-ssrs.aspx

Hope this will help..

Reply