ProcessInstanceHistory

This read-only object shows all steps and pending approval requests associated with an approval process (ProcessInstance).

Supported Calls

describeSObjects()

Special Access Rules

Portal and Communities users can’t access this object.

Fields

Field Details
ActorId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the user who is currently assigned to this ProcessInstance.
Comments
Type
string
Properties
Filter, Nillable, Sort
Description
Comments for a ProcessInstanceStep. This field doesn't apply to ProcessInstanceWorkitem records.
ElapsedTimeInDays
Type
double
Properties
Filter, Nillable, Sort
Description
The total time in days between when the approval process instance was started and when it was completed.
ElapsedTimeInHours
Type
double
Properties
Filter, Nillable, Sort
Description
The total time in hours between when the approval process instance was started and when it was completed.
ElapsedTimeInMinutes
Type
double
Properties
Filter, Nillable, Sort
Description
The total time in minutes between when the approval process instance was started and when it was completed.
IsPending
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the ProcessInstance is pending (true) or not (false).
OriginalActorId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the user who was originally assigned this ProcessInstance.
ProcessInstanceId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the ProcessInstance.
RemindersSent
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Number of reminders that have been sent. Default is 0 (zero).
StepStatus
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Indicates the current status of the ProcessInstanceStep.
TargetObjectId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the object being approved.

Usage

This object helps you replicate the related list functionality of the Salesforce.com user interface for approval processes. Use ProcessInstanceHistory for a unified read-only view of the ProcessInstanceStep and ProcessInstanceWorkitem objects. You can't queryProcessInstanceHistory. Instead, you can query ProcessInstanceHistory by including it in a nested query on the parent ProcessInstance object. For example, the following SOQL query returns all the ProcessInstanceHistory records related to individual ProcessInstance records. The nested query references StepsAndWorkitems, which is the child relationshipName for ProcessInstanceHistory in the ProcessInstance object.

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

This object respects field-level security on the parent object.

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