+ Start a Discussion
sfg1sfg1 

Record deletion and retrieval of deleted records in salesforce

I have a requeirement to delete the Inactive projects data from salesforce and take a backup. Whenever client request for the deleted data we need to restore in Salesforce. Is this possible in salesforce. Can any one suggest me the best approach.
Dev_AryaDev_Arya
hi sfg1, 

a deleted record is placed in the recycle in for 15 days during which you can retrieve it using undelete function.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_examples_undelete.htm

If your use case is simply to hide and unhide the inactive data, rather than deleteing the records, there are several other ways ot achieve this. I would request you to elaborate your use case here, so we can dig deeper in to the solution.

Cheers, Dev

 
sfg1sfg1
Hi Dev,
Thanks for your reply. We are working for Healthcare project. Our client data contains Doctors data, patient data and we have a code for each disease and we have insurance details. We are planning to delete inactive project data and want to restore data in some cases if client required. For any requirement like generating report or some other requirement. We have used 97% of out storage capacity. Can you please suggest any solution for deleting data and restoring.
Dev_AryaDev_Arya
hi sfg1,

sorry for the late reply, I was occupieed with some personal business.
With terms of data, salesforce is a joke. They charge extra for the additional storage limit despite customers paying so much money for the licenses.
You can purchase additional storage space from SF or if you have Professional, Enterprise, and Unlimited Editions, you can add user licenses which provide additional storage per license. Please connect with your Account Manager for the exact prices. 
https://help.salesforce.com/articleView?id=admin_monitorresources.htm&type=0
In your case, deletion is not a good idea, You could also backup your data, I meant extract it and store it.

Hope this helps. Please mark it solved, if this answers your question.
Cheers,Dev