---
schema_version: "1"
id: 7f7fa53d8d0a8484a8702c075eebeef8d02c4d8b9bffac8f345328cdfdc0d0f3
title: EmptyRecycleBinResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_methods_system_database_EmptyRecycleBinResult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_EmptyRecycleBinResult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 299c77c66384f82a58f6e37112d8b42389b2067b2cd936c0cd01c6958ca215f4
description: The result of the emptyRecycleBin DML operation returned by the Database.emptyRecycleBin method.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.Returns the ID of the record or sObject you attempted to delete.Returns true if the record or sObject was successfully removed from the Recycle Bin; otherwise false.
---
# EmptyRecycleBinResult Class

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

## 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

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()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_EmptyRecycleBinResult.htm#apex_Database_EmptyRecycleBinResult_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()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_EmptyRecycleBinResult.htm#apex_Database_EmptyRecycleBinResult_getId)**  
    Returns the ID of the record or sObject you attempted to delete.
- **[isSuccess()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_EmptyRecycleBinResult.htm#apex_Database_EmptyRecycleBinResult_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](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_id.htm#apex_methods_system_id "Contains methods for the ID primitive data type.")

### 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](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")