New answers tagged

0

Instead of this SOQL: [SELECT Id, ActorId, OriginalActorId, ProcessInstance.TargetObjectId FROM ProcessInstanceWorkitem WHERE ProcessInstance.TargetObjectId = <Opportunity Record ID>]; just put a condition ActorId =: userInfo.getUserId() then you can update the current actorId.


1

I have tried the above code without sharing and made the function call as public and it worked for me. Also, please make sure you do not declare any attribute with the same name in VF Component. public String approvalComments { get { if ( approvalComments == null ) { String lastStepComments = getLastApprovalStepComments(); ...


0

Older thread but in case it helps others. I was able to get this working by running a flow as system and calling an apex action. Seemed cleaner than creating a platform event. Edit: This approach will only work if the user initiating the flow has the modify all permission on the object that is being approved.


Top 50 recent answers are included