---
schema_version: "1"
id: 1f5c87ee7b42c89b6b978482c45bd8fb9d966ba2f8c52da212769217190ffd99
title: GetDeletedResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_database_getdeletedresult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_database_getdeletedresult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9eb68551e6e67f4f3d62fe7dba1948a21a0488e17b49059652591a2aba6be852
description: Contains the deleted records retrieved for a specific sObject type and time window.Returns a list of deleted records for the time window specified in the Database.getDeleted method call.Returns the date in Coordinated Universal Time (UTC) of the earliest physically deleted object for the sObject type specified in Database.getDeleted.Returns the date in Coordinated Universal Time (UTC) of the last date covered in the Database.getDeleted call.
---
# GetDeletedResult Class

Contains the deleted records retrieved for a specific sObject type and time window.

## Namespace

[Database](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Database.htm "The Database namespace provides classes used with DML operations.")

## Usage

The Database.getDeleted method returns the deleted record information as a Database.GetDeletedResult object.

## GetDeletedResult Methods

The following are methods for GetDeletedResult. All are instance methods.

- **[getDeletedRecords()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_database_getdeletedresult.htm#apex_Database_GetDeletedResult_getDeletedRecords)**  
    Returns a list of deleted records for the time window specified in the Database.getDeleted method call.
- **[getEarliestDateAvailable()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_database_getdeletedresult.htm#apex_Database_GetDeletedResult_getEarliestDateAvailable)**  
    Returns the date in Coordinated Universal Time (UTC) of the earliest physically deleted object for the sObject type specified in Database.getDeleted.
- **[getLatestDateCovered()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_database_getdeletedresult.htm#apex_Database_GetDeletedResult_getLatestDateCovered)**  
    Returns the date in Coordinated Universal Time (UTC) of the last date covered in the Database.getDeleted call.

### getDeletedRecords()

Returns a list of deleted records for the time window specified in the Database.getDeleted method call.

#### Signature

public List<Database.DeletedRecord> getDeletedRecords()

#### Return Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[Database.DeletedRecord](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_database_deletedrecord.htm#apex_class_database_deletedrecord "Contains information about a deleted record.")\>

### getEarliestDateAvailable()

Returns the date in Coordinated Universal Time (UTC) of the earliest physically deleted object for the sObject type specified in Database.getDeleted.

#### Signature

public Date getEarliestDateAvailable()

#### Return Value

Type: [Date](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_date.htm#apex_methods_system_date "Contains methods for the Date primitive data type.")

### getLatestDateCovered()

Returns the date in Coordinated Universal Time (UTC) of the last date covered in the Database.getDeleted call.

#### Signature

public Date getLatestDateCovered()

#### Return Value

Type: [Date](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_date.htm#apex_methods_system_date "Contains methods for the Date primitive data type.")

#### Usage

If there is a value, it is less than or equal to the endDate argument of Database.getDeleted. A value here indicates that, for safety, you should use this value for the startDate of your next call to capture the changes that started after this date but didn’t complete before endDate and were, therefore, not returned in the previous call.