Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/22/2023 06:05 AM
Hi,
During Request Approval, with in a workflow, if users manager is Inactive, then the approval should be sent to user's Manager's Manager
How can we use custom assignment task to check manager's status and assign the request to the manager's manager?
Please let me know the query on how to implement above functionality?
08/22/2023 06:20 AM - edited 08/22/2023 06:21 AM
Hi @dkumar ,
Use below query in workflow's custom assignment to route request to user's manager's manager when user's manager is inactive
select m.userkey as userkey from users u, users m where u.owner = m.username and m.statuskey = 1 and u.username = '${user.username}'
union
select m.manager as userkey from users u, users m where u.owner = m.username and m.statuskey = 0 and u.username = '${user.username}' and m.manager in (select userkey from users a where a.statuskey=1)
Let me know if it helps