Difference between getDeleted() and queryAll()
|Knowledge Article Number||000171388|
|Description||getDeleted() and queryAll() API calls look similar since most of customers use these methods to retrieve the deleted records .|
|Resolution||Following are the differences between these calls,
1. queryAll() returns all the deleted and non-deleted records with complete record details requested, however, getDeleted() only returns the Id of the deleted records.
2. In order to use queryAll() call for retrieving deleted records add isdeleted = true in filter criteria.
3. queryAll() and getDeleted() can retrieve the records in the recycle bin and also the records deleted from the recycle bin for 15 days or before being purged by Physical Delete*. The data can be in soft-deleted state for 15 days before permanent deletion.
Physical Delete* - A Manual job run to hard delete the records from the server.
Note: Account Executive will assist the customer if they are interested in retrieving the records that are already purged