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
Eesha.SinghEesha.Singh 

How to fetch actual approver for each step of the approval process from approval history

We have a custom object Price Reuqest and have complex approval processes defined for it. We want to capture the Actual Approver for each step of the approval process. I checked forums about using ProcessInstanceHistory and ProcessInstanceWorkItem but i do not understand where to start from. Any help or code or steps on how to accomplish this will be helpful.
Rajesh SriramuluRajesh Sriramulu
Please use below query to get the Actual Approver(Actorid):
SELECT Id, (SELECT Id,TargetObjectId , StepStatus,Actorid, Comments FROM StepsAndWorkitems where StepStatus = 'Pending')
FROM ProcessInstance

Regards,
Rajesh