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
scriptagentscriptagent 

Reassign Approval Request

Hi guys,
 
I'm trying to reassign an approval request with an apex code.
So for example, after a click on the "Submit for approval"- button, I want to change the approver,
but only for the current Quote. 
 
I guess, maybe I should use the ProcessSubmitRequest() method, but unfortunately I haven't a real idea right now.
 
Hope someone can help, thank you very much in advance!
Peter
scriptagentscriptagent
I have found a solution:
 
You have to update only the ActorId (ProcessInstanceWorkitem[]).
Ken KoellnerKen Koellner

Does that work?

 

I thought that field was not writeable.

 

-Ken

 

kamlesh_chauhankamlesh_chauhan

ProcessInstanceWorkitem is editable object.

 

However ProcessInstanceHistory object is not editable.

 

Regards,

Kamlesh