Newer Version Available
queryAll()
Syntax
Usage
Use queryAll() to identify the records that have been deleted because of a merge or delete. queryAll() has read-only access to the field isDeleted but is otherwise the same as query(). Use queryAll() in preparation to undelete records with the undelete() call.
Filter on the isArchived field to find only the archived objects. You can update or delete archived records, but you can't update the isArchived field.
Arguments
| Name | Type | Description |
|---|---|---|
| queryString | string | Contains the SOQL query, which specifies the object to query, the fields to return, and any conditions for including a specific object in the query. See Salesforce SOQL and SOSL Reference Guide. |
Sample Code—Java
This sample performs a query to get all the accounts, whether they’re deleted or not. It sets a custom batch size of 250 records. It fetches all batches of records by calling queryAll() the first time and then queryMore(). The names and the value of the isDeleted fields of all returned accounts are written to the console.
Sample Code—C#
This sample performs a query to get all the accounts, whether they’re deleted or not. It sets a custom batch size of 250 records. It fetches all batches of records by calling queryAll() the first time and then queryMore(). The names and the value of the isDeleted fields of all returned accounts are written to the console.