GetDeletedResult Class

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

Namespace

Database

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()
    Returns a list of deleted records for the time window specified in the Database.getDeleted method call.
  • getEarliestDateAvailable()
    Returns the date in Coordinated Universal Time (UTC) of the earliest physically deleted object for the sObject type specified in Database.getDeleted.
  • 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<Database.DeletedRecord>

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

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

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.