Question
Is there a simple way to query deleted records for quick and dirty data inspections?
Background
Doing this in Apex code or with integrations is fairly straight-forward just use the ALL ROWS
key word in a SOQL query, or use the queryAll method in integrations.
However, if I just need to an ad-hoc query to find the deleted items, I'm at a lost to how to do this. If I do the query in the dev console or anonymous apex I get an error that ALL ROWS
not permitted in this context. I've tried Dataloader.io, but it doesn't have any options I can find to export deleted records. I've also tried workbench, but I get the same ALL ROWS
not permitted in this context.
The recycle bin works in some cases, but there are quite a few, e.g. Opportunity Line Items, scenarios where this doesn't work.
Is there really no good way to export deleted records without doing using some code to use the api queryAll method?