ProcessRequest Class

The ProcessRequest class is the parent class for the ProcessSubmitRequest and ProcessWorkitemRequest classes. Use the ProcessRequest class to write generic Apex that can process objects from either class.

Approval

The request must be instantiated via the child classes, ProcessSubmitRequest and ProcessWorkItemRequest.

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

  • getComments()

    Returns the comments that have been added previously to the approval request.

  • getNextApproverIds()

    Returns the list of user IDs of user specified as approvers.

  • setComments(comments)

    Sets the comments to be added to the approval request.

  • setNextApproverIds(nextApproverIds)

    If the next step in your approval process is another Apex approval process, you specify exactly one user ID as the next approver. If not, you cannot specify a user ID and this method must be null. This method sets the ActorId field of the associated ProcessInstanceWorkItem.

Returns the comments that have been added previously to the approval request.

public String getComments()

Type: String

Returns the list of user IDs of user specified as approvers.

public ID[] getNextApproverIds()

Type: ID[]

Sets the comments to be added to the approval request.

public Void setComments(String comments)

Type: Void

If the next step in your approval process is another Apex approval process, you specify exactly one user ID as the next approver. If not, you cannot specify a user ID and this method must be null. This method sets the ActorId field of the associated ProcessInstanceWorkItem.

public Void setNextApproverIds(ID[] nextApproverIds)

  • nextApproverIds: Type: ID[] Must be a single-entry list.

Type: Void