07/18/2022 07:27 AM
Hi,
I am trying to assign user's manager and secondary manager as the Assignee of access request using workflow custom assignment.
I tried to use the below query but didn't work.
query: select userkey from users where manager = ${user.manager} and secondarymanager = ${user.secondarymanager}
Could you please assist on this?
Thanks in advance.
Best regards
Harish
Solved! Go to Solution.
07/18/2022 07:46 AM - edited 07/18/2022 10:05 AM
select manager as userkey from users where userkey = ${user.id} union select SECONDARYMANAGER as userkey from users where userkey = ${user.id}
07/18/2022 08:08 AM
Hi Rushikesh,
Thank you for the reply.
I tried accordingly with secondaryManagerId. But it is not assigning the correct Assignee.
Query: select userkey from users where manager = ${user.manager} and secondarymanager = ${user. secondaryManagerId}
Could you please check if there is any mistake in the query or is there any other alternative?
Thanks
Harish
07/18/2022 08:09 AM
if you want to assign approval to manager & secondary manager please use query from above post
07/18/2022 08:53 AM
Hi Rushikesh,
Thank you.
I have tried to use that query in workflow and assign the workflow to a security system.
But is not assigning the correct assignees in the ARS. It is assiging the random user as assignee.
Query: select manager as userkey from users where userskey = ${user.id} union select SECONDARYMANAGER as userkey from users where userskey = ${user.id}
Workflow:
And also the request is not opening in ARS. It fails with the below error in the screenshot:
07/18/2022 09:01 AM - edited 07/18/2022 09:09 AM
Harish,
You have a typo in the workflow's custom query. It's userkey not userskey .
07/18/2022 09:14 AM
please select user field as Custom Query not user Group
07/18/2022 09:36 AM
Thanks @rushikeshvartak and @avinashchhetri it worked. I made your comment as Accepted Solution.
But i there is a small typo in it, as @avinashchhetri mentioned - It's userkey not userskey
If possible please edit this in the solution.