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?
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.
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.
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.
Hope this will help..
My Blog: MS CRM Customization