---
schema_version: "1"
id: 374f1da9c46ca65c27f9bed813525b99775df060f98ed2a43933b7ed14756f07
title: ProcessResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ProcessResult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 891212de6da81f62a6e264ca9bd8b0fc1372f8b4156a6c825f4942738006a4cb
description: "After you submit a record for approval, use the ProcessResult class to process the results of an approval process.The ID of the record being processed.If an error occurred, returns an array of one or more database error objects including the error code and description.The ID of the approval process that has been submitted for approval.The status of the current approval process. Valid values are: Approved, Rejected, Removed or Pending.The IDs of the new items submitted to the approval process. There can be 0 or 1 approval processes. A Boolean value that is set to true if the approval process completed successfully; otherwise, it is set to false."
---
# ProcessResult Class

After you submit a record for approval, use the ProcessResult class to process the results of an approval process.

## Namespace

[Approval](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Approval.htm "The Approval namespace provides classes and methods for approval processes.")

## Usage

A ProcessResult object is returned by the process method. You must specify the Approval namespace when creating an instance of this class. For example:

Approval.ProcessResult result = Approval.process(req1);

## ProcessResult Methods

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

- **[getEntityId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_getEntityId)**  
    The ID of the record being processed.
- **[getErrors()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_getErrors)**  
    If an error occurred, returns an array of one or more database error objects including the error code and description.
- **[getInstanceId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_getInstanceId)**  
    The ID of the approval process that has been submitted for approval.
- **[getInstanceStatus()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_getInstanceStatus)**  
    The status of the current approval process. Valid values are: Approved, Rejected, Removed or Pending.
- **[getNewWorkitemIds()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_getNewWorkitemIds)**  
    The IDs of the new items submitted to the approval process. There can be 0 or 1 approval processes.
- **[isSuccess()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ProcessResult.htm#apex_Approval_ProcessResult_isSuccess)**  
    A Boolean value that is set to true if the approval process completed successfully; otherwise, it is set to false.

### getEntityId()

The ID of the record being processed.

#### Signature

public String getEntityId()

#### Return Value

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

### getErrors()

If an error occurred, returns an array of one or more database error objects including the error code and description.

#### Signature

public Database.Error\[\] getErrors()

#### Return Value

Type: [Database.Error](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_error.htm#apex_methods_system_database_error "Represents information about an error that occurred during a DML operation when using a Database method.")\[\]

### getInstanceId()

The ID of the approval process that has been submitted for approval.

#### Signature

public String getInstanceId()

#### Return Value

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

### getInstanceStatus()

The status of the current approval process. Valid values are: Approved, Rejected, Removed or Pending.

#### Signature

public String getInstanceStatus()

#### Return Value

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

### getNewWorkitemIds()

The IDs of the new items submitted to the approval process. There can be 0 or 1 approval processes.

#### Signature

public ID\[\] getNewWorkitemIds()

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

A Boolean value that is set to true if the approval process completed successfully; otherwise, it is set to 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.")