+ Start a Discussion
JesseAJesseA 

Identify current step of Approval process in trigger

I am trying to piggy-back some functionality onto an Approval Process step. For example if the Related User for step 2 (ProcessInstanceWorkitem.ActorId?) is set to a certain user then i want to perform an additional function in the background. But only when that step is active. I can use the ProcessInstance table to find the ProcessInstanceId which i can then use to find the WorkItem whose ActorId field shows me the related user but I don't know what step in the approval process I am in. Is it step 2 or any other step?

 

How can I find what step of the approval process a record is in?

JesseAJesseA

Is this a lost cause? 

john hejohn he

I face the similar issue.  does anyone know how to identify the current approval process step in the apex code (or trigger)?