3

Quick question. I have record that I deleted two days ago. I still can do SOQL query and get it in workbench using isDeleted field.

Does Salesforce have some recycle mechanism for these kind of records? Will I still able to select isDeleted records in an year for instance?

2 Answers 2

4

Records once deleted reside in the recycle-bin, and they stay there for 15 days unless to forcefully delete them. Salesforce documentation regarding this states two important points

  • Deleted records remain in the recycle bin for 15 days, and can be restored during that time. To permanently remove your deleted items before the 15-day period, administrators and users with the Modify All Data permission, can click Empty your Recycle Bin or Empty your organization’s Recycle Bin.
  • After 15 days, deleted items are purged from the recycle bin, and once purged, they can’t be recovered.

How to troubleshoot the data, that is removed from Recycle bin

Records may still be queried, as the documentation states

If the records are deleted from the Recycle Bin, you may still be able to query on the record to retrieve the information but you cannot Undelete the same.

Note that availability of the records in the Recycle Bin may be variable and we cannot guarantee a specific length of time they will be available to query once removed or hard deleted from the recycle bin.

As for "will you be able to query records after a year of deletion", Salesforce doesn't guarantee the specific length of time the deleted records can be queried. I am sure Salesforce won't give a year's leverage to its customers for deleted records.

3
  • Mahmood, actually it doesn't matter for me what happens with recycle bin. I'm just wondering is it possible to query deleted record in an year or so? Nov 8, 2017 at 13:38
  • @EugeneVabishchevich I have updated my answer and included more details that should answer your question.
    – Mahmood
    Nov 8, 2017 at 13:46
  • 1
    thanks! I think it's better to ask salesforce support to have some information about that! haha Nov 8, 2017 at 14:37
0

Deleted records remain in the recycle bin for 15 days, and can be restored during that time. To permanently remove your deleted items before the 15-day period, administrators and users with the “Modify All Data” permission, can click Empty your Recycle Bin or Empty your organization’s Recycle Bin. After 15 days, deleted items are purged from the recycle bin, and once purged, they can’t be recovered.

IsDeleted = false, will skip querying for the deleted records, this would infact increase your query performance, as the data volume will decrease. Placing the filter also plays an important role in querying, putting the filter that would reduce the number of records fetched in big way should be placed first and then so on.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .