I know you can retrieve all fields from a single Object in Salesforce. I have started doing something like this:
SObjectType accountType = Schema.getGlobalDescribe().get('Account'); Map<String,Schema.SObjectField> mfields = accountType.getDescribe().fields.getMap();
What do I need to use to query and retrieve on all object types of all deleted records in the recycle bin?
I need to schedule a job that regularly does this in order to backup deleted records every week.