I was wondering why this query retrieves ZERO records when executed in the Workbench and Developer console (though I have records in the Recycle Bin):

Select Id, IsDeleted FROM Account WHERE IsDeleted = TRUE

The same query works in the Data Loader when using Export All. Why this behavior? Any thoughts?

2 Answers 2


Did you check "Deleted and archived records:" as "Include" ?

enter image description here

And as for the Developer console, you have no way to do it. You can do with Apex using SOQL with the "ALL ROWS" option, but the Query Editor on the Developer console doesn't support it.

  • Thank you Shingo. I missed this checkbox"Deleted and archived records". Now it's working. Commented Jul 15, 2015 at 6:56

Are you using the "QueryAll()" API call when you try to retrieve the delete records? Using the regular "Query()" call won't allow you to retrieve delete records. See the API documentation on the "QueryAll()" API call here:




You must log in to answer this question.

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