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
gtindugtindu 

ProcessWorkitemRequest - Reassign with Apex

Is there any way to reassign an approval request with comments?  I have found that I can update the ActorId on the ProcessInstanceWorkitem object, however - I cannot update ProcessInstanceStep to include comments...

 

The Approval.ProcessWorkitemRequest class is useless for reassignment - you can only Approve, Reject, Recall.  I have found that if you set the Action to "Reassigned" it will not complain - but you will get the below error when calling it...

 

core.workflow.process.WorkitemAction cannot be cast to core.workflow.process.ReassignAction

Imran MohammedImran Mohammed

wwre you able to do this?