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
thatheraherethatherahere 

Checl Current user is Approver or not

Hi,
How can I check whether the current user is an approver or not for an Approval Process? 

 

Best Answer chosen by thatherahere
thatheraherethatherahere
Hi,
Thanks for your reply.
I have done that by querying the ProcessInstanceWorkitem record for object and matching the current User with the Actor_Id. If match found he will be able to work further otherwise will not. :)

Thanks

All Answers

Vinita_SFDCVinita_SFDC

Hello,

 

At present we can only make a check at Entry Criteria of the approval process for the current user. So if you wish to make a check that the apporver name abc should not be the current user then you can add criteria like

 

Current User: Username not equal to abc

thatheraherethatherahere
Hi,
Thanks for your reply.
I have done that by querying the ProcessInstanceWorkitem record for object and matching the current User with the Actor_Id. If match found he will be able to work further otherwise will not. :)

Thanks
This was selected as the best answer