Salesforce developers work with various codes dealing with approvals and approval history. This post will define what Process Instance Node is and how it is used within Salesforce.
Definition of Process Instance Node
Process Instance Node is an object used in Force.com to show a certain step during an approval process. This object is often used by developers to retrieve back their approval histories. It also describes a step in a process that is already running.
Field under Process Instance Node
Here is a list of fields you will be working with when using the Process Instance Node object:
- CompletedDate – The step in the approval process has to have a completion date and time, reflected in this field.
- ElapsedTimeInMinutes – The total number of minutes that had passed after starting this step.
- ElapsedTimeInHours – The total number of hours that had passed after starting this step.
- ElapsedTimeInDays – The total number of days that had passed after starting this step.
- LastActorID – The ID of the last person who acted upon this step, regardless whether he approved or rejected it.
- ProcessNodeName – Identifies the step’s name.
- ProcessInstanceID – Identifies which approval process this specific step is included in.
- ProcessNodeID – Shows the specific step identifier.
- NodeStatus – This approval instance’s current status. You may choose from Approved, Pending, or Started.
Considerations in Using Process Instance Node
Keep these things in mind when dealing with Process Instance Node:
- Community and portal users need to have a special license so that they can use this object. They should have the Partner Community license as well as the Customer Community Plus license.
- Process Instance Node supports the following calls:
describeSObjects (), retrieve (), and query ()
- ProcessInstanceNode fields were not populated during the Salesforce Summer ’14 rollout, making all these approval instances pending. This issue will be acted upon accordingly, and hopefully all ProcessInstancenode fields will be properly populated in the coming Salesforce releases.
In summary, Process Instance Node is a useful object that tells users about which step is already in place during a running process. It has many fields to be completed, and requires a special license in order for portal and community users to use it.