EmptyRecycleBinResult Class

The result of the emptyRecycleBin DML operation returned by the Database.emptyRecycleBin method.

Namespace

Database

Usage

A list of Database.EmptyRecycleBinResult objects is returned by the Database.emptyRecycleBin method. Each object in the list corresponds to either a record ID or an sObject passed as the parameter in the Database.emptyRecycleBin method. The first index in the EmptyRecycleBinResult list matches the first record or sObject specified in the list, the second with the second, and so on.

EmptyRecycleBinResult Methods

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

  • getErrors()
    If an error occurred during the delete for this record or sObject, returns a list of one or more Database.Error objects. If no errors occurred, the returned list is empty.
  • getId()
    Returns the ID of the record or sObject you attempted to delete.
  • isSuccess()
    Returns true if the record or sObject was successfully removed from the Recycle Bin; otherwise false.

getErrors()

If an error occurred during the delete for this record or sObject, returns a list of one or more Database.Error objects. If no errors occurred, the returned list is empty.

Signature

public Database.Errors[] getErrors()

Return Value

Type: Database.Errors []

getId()

Returns the ID of the record or sObject you attempted to delete.

Signature

public ID getId()

Return Value

Type: ID

isSuccess()

Returns true if the record or sObject was successfully removed from the Recycle Bin; otherwise false.

Signature

public Boolean isSuccess()

Return Value

Type: Boolean