Retrieving Archived and Deleted Records

Retrieving Archived and Deleted Records

The Salesforce API Does Not Routinely Return Archived and Delete Records

Normally, the Salesforce API does not return archived and deleted records as part of the result of a query.

How to Include Archived and Deleted Records

If you want to include archived and deleted records, add the _QueryAll suffix to the table name. For example, the following query retrieves only the task records that have been archived:

SELECT * FROM SALESFORCE_LS.CData.Salesforce.Task_QueryAll  
where IsArchived = 'true'**

You can also replicate all records including archived and task records to a local table by using the SF_ReplicateIAD stored procedure.