DeleteResult Class

Represents the result of a delete operation on an sObject record. The result is returned by the DataSource.deleteRows method of the DataSource.Connection class.

DataSource

A delete operation on external object records generates an array of objects of type DataSource.DeleteResult. Its methods create result records that indicate whether the delete operation succeeded or failed.

The following are properties for DeleteResult.

  • errorMessage

    The error message that’s generated by a failed delete operation. Recorded with a result of type DataSource.DeleteResult.

  • externalId

    The unique identifier of a row that represents an external object record to delete.

  • success

    Indicates whether a delete operation succeeded or failed.

The error message that’s generated by a failed delete operation. Recorded with a result of type DataSource.DeleteResult.

public String errorMessage {get; set;}

Type: String

The unique identifier of a row that represents an external object record to delete.

public String externalId {get; set;}

Type: String

Indicates whether a delete operation succeeded or failed.

public Boolean success {get; set;}

Type: Boolean

The following are methods for DeleteResult.

  • equals(obj)

    Maintains the integrity of lists of type DeleteResult by determining the equality of external objects in a list. This method is dynamic and is based on the equals method in Java.

  • failure(externalId, errorMessage)

    Creates a delete result indicating the failure of a delete request for a given external ID.

  • hashCode()

    Maintains the integrity of lists of type DeleteResult by determining the uniqueness of the external object records in a list.

  • success(externalId)

    Creates a delete result indicating the successful completion of a delete request for a given external ID.

Maintains the integrity of lists of type DeleteResult by determining the equality of external objects in a list. This method is dynamic and is based on the equals method in Java.

public Boolean equals(Object obj)

  • obj:

    Type:

    Object External object whose key is to be validated.

For information about the equals method, see Using Custom Types in Map Keys and Sets.

Type: Boolean

Creates a delete result indicating the failure of a delete request for a given external ID.

public static DataSource.DeleteResult failure(String externalId, String errorMessage)

  • externalId:

    Type: String

    The unique identifier of the sObject record to delete.

  • errorMessage:

    Type: String

    The reason the delete operation failed.

Type: DataSource.DeleteResult

Status result of the delete operation.

Maintains the integrity of lists of type DeleteResult by determining the uniqueness of the external object records in a list.

public Integer hashCode()

Type: Integer

Creates a delete result indicating the successful completion of a delete request for a given external ID.

public static DataSource.DeleteResult success(String externalId)

  • externalId:

    Type: String The external ID of the record to delete.

Type: DataSource.DeleteResult

Status result of the delete operation for the sObject with the given external ID.