Newer Version Available
ProcessInstance
For approval process instances that were completed before the Summer ’14 rollout, all Process Instance fields are automatically populated, with one exception: CompletedDate is never populated for approval process instances that were completed before January 1, 2013. For approval process instances that were pending during the Summer ’14 rollout, all ProcessInstance fields are automatically populated, with two exceptions: CompletedDate and LastActorId are populated only after the approval process instance is complete.
Supported Calls
describeSObjects(), query(), retrieve()
Fields
| Field | Details |
|---|---|
| CompletedDate |
|
| ElapsedTimeInDays |
|
| ElapsedTimeInHours |
|
| ElapsedTimeInMinutes |
|
| LastActorId |
|
| ProcessDefinitionId |
|
| Status |
|
| TargetObjectId |
|
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.
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.
ProcessInstanceHistory can help provide a unified read-only view of the ProcessInstanceStep and ProcessInstanceWorkitem objects.
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
- ProcessInstanceHistory
- History is available for tracked fields of the object.