Requirement
Need to be able to mass transfer pending approval requests.
Solution
APPROACH 1: Standard Salesforce Approach
- Setup >> Mass Transfer >> Mass Transfer Approval Processes
- Enter the criteria and select the new approver
APPROACH 2: Using Apex Code
ProcessInstanceWorkItem pitems = [SELECT Id, ActorId FROM ProcessInstanceWorkItem]; for(ProcessInstanceWorkItem p: pitems) pi.ActorId = '0051I0000027LCVQA2';//replace with user id. update pitems;