function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ShrawanShrawan 

Fetching Step Number, Assigned Approver from Approval Process standard objects

Hi,

I am trying to fetch Step Number and Assigned Approver for a particular Approval process. I understand that ProcessDefinition stores the Name of the Process and ProcessNode stores all the Steps but where are the Step Number and Assigned Approver stored in standard objects.

Any help regarding this would be greatly helpful.

Regards
Shrawan
Keyur  ModiKeyur Modi
Hi,
please visit https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_process.htm
this data model which will help you to understand the process flow of the Approval process.

If you see this data model there is object called processInstanceStep.
if your approval process go through 2 step then it will create three record below that processInstance step . so thus how you can track the number of steps in the approval process.

please let me know if this will help

Thanks,
Keyur Modi
 
ShrawanShrawan
Hi Keyur

Thank you for your response.
I understand that I can identify which Step is the current record in, but how do I know the sequence of the Steps?
My use case is to display an ordered list of the Approval Steps (ordered by Step Number). How do I fetch this order form the Standard Objects. Can you please explain it further if I am missing anything?

Regards
Shrawan Raina