ProcessInstance

Represents an instance of a single, end-to-end approval process.

Supported Calls

describeSObjects(), query(), retrieve()

Special Access Rules

Customer Portal users can't access this object.

Fields

Field Details
IsDeleted
Type
boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
Status
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The status of this approval instance, for example Started, Pending, or Approved.
TargetObjectId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the object affected by this approval instance.

Usage

Use this object to query or retrieve an approval process.

The following SOQL query returns details for all the ProcessInstanceStep records related to individual ProcessInstance records. The nested query references Steps, which is the child relationshipName for ProcessInstanceStep in the ProcessInstance object.

SELECT Id, (SELECT Id, StepStatus, Comments FROM Steps)
FROM ProcessInstance

The following SOQL query returns details for all the ProcessInstanceWorkitem records related to individual ProcessInstance records. The nested query references Workitems, which is the child relationshipName for ProcessInstanceWorkitem in the ProcessInstance object.

SELECT Id, (SELECT Id, ActorId, ProcessInstanceId FROM Workitems)
FROM ProcessInstance

ProcessInstanceHistory can help provide a unified read-only view of the ProcessInstanceStep and ProcessInstanceWorkitem objects.

© Copyright 2000–2014 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.