ProcessInstanceHistory

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

Introduced in API version 8.0.

describeSObjects(), delete()

  • Type: reference

  • Properties: Filter, Group, Sort

  • Description:

    ID of the user who is assigned to this ProcessInstance.

    This is a polymorphic relationship field.

  • Relationship name: Actor

  • Relationship type: polymorphic

  • Refers to: Queue, User

  • Type: string
  • Properties: Filter, Nillable, Sort
  • Description: Comments for a ProcessInstanceStep . This field doesn’t apply to ProcessInstanceWorkitem records.
  • Type: double
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 31.0
  • Description: The total time in days between when the approval process instance was started and when it was completed.
  • Type: double
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 31.0
  • Description: The total time in hours between when the approval process instance was started and when it was completed.
  • Type: double
  • Properties: Filter, Nillable, Sort
  • Introduced: API version 31.0
  • Description: The total time in minutes between when the approval process instance was started and when it was completed.
  • Type: boolean
  • Properties: Defaulted on create, Filter, Group, Sort
  • Description: Indicates whether the ProcessInstance is pending (true) or not (false).
  • Default value: false
  • Type: reference

  • Properties: Filter, Group, Sort

  • Description:

    ID of the user who was originally assigned this ProcessInstance.

    This is a polymorphic relationship field.

  • Relationship name: OriginalActor

  • Relationship type: polymorphic

  • Refers to: Queue, User

  • Type: reference

  • Properties: Filter, Group, Sort

  • Description:

    ID of the ProcessInstance.

    This is a relationship field.

  • Relationship name: ProcessInstance

  • Relationship type: relationship

  • Refers to: ProcessInstance

  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 35.0

  • Description:

    ID of this step.

    This is a relationship field.

  • Relationship name: ProcessNode

  • Relationship type: relationship

  • Refers to: ProcessNode

  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Description: Number of reminders that have been sent. Default is 0 (zero).
  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort
  • Description: Indicates the status of the ProcessInstanceStep.

This object helps you replicate the related list functionality of the Salesforce user interface for approval processes. Use ProcessInstanceHistory for a unified read-only view of the ProcessInstanceStep and ProcessInstanceWorkItem objects. You can’t query ProcessInstanceHistory. Instead, you can query ProcessInstanceHistory by including it in a nested query on the parent ProcessInstance object. For example, this 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.

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