when user Inactive approval send to manager for RITM approval in workflow.

thanuja thanuja
Tera Contributor

Hi Community, 

 

I need help for inactive user approval send to manager approval in flow designer.

Example: Tommy is actual approver but Tommy is inactive in ServiceNow so the approval is skipping. This time the approval wants to trigger to Tommy Manager through flow designer for service catalog 

Help me please.

 

Thanks,

 

Thanuja

1 ACCEPTED SOLUTION

Vasu ch
Kilo Sage

Hi @thanuja thanuja 

You can use the following script for the rules.

sys_id = "";
var obj = new GlideRecord("sys_user");
obj.get("46d44a23a9fe19810012d100cca80666");  // User sys_id

if(obj.active){
    sys_id = obj.sys_id;
}else{
    if(obj.manager){
        sys_id = obj.manager;
    }
}
return "ApprovesAnyU["+sys_id+"]";

 

Regards,

Vasu Cheeli

 

View solution in original post

11 REPLIES 11

Hi @thanuja thanuja 

Before the approval step, you need to first check if approver is active or not using filter condition, then if it is active send it for approval to the approval, else send it to approver's manager

 

Best Regards
Aman Kumar

Vasu ch
Kilo Sage

Hi @thanuja thanuja 

You can use the following script for the rules.

sys_id = "";
var obj = new GlideRecord("sys_user");
obj.get("46d44a23a9fe19810012d100cca80666");  // User sys_id

if(obj.active){
    sys_id = obj.sys_id;
}else{
    if(obj.manager){
        sys_id = obj.manager;
    }
}
return "ApprovesAnyU["+sys_id+"]";

 

Regards,

Vasu Cheeli

 

Hi Vasu,

 

Where can I use this script? in flow designer?

 

Thanks,

Thanuja

Yes. You have to use it in flow designer

Thank you so much @Vasu ch 

It's working as expected.

 

Thanks,

Thanuja