IN ACTIVE USER to reassign active user approver

dheeru_1994
Tera Contributor

Hii All 
i made a workflow on requested item table  in user activity i select one user  to generate approver in requested item table  it is working fine now i have to add like if my user is in active then who will generate approver  how to fix this issue what changes would i have to do 
thanks and regards 

1 ACCEPTED SOLUTION

Sohithanjan G
Kilo Sage
Kilo Sage

Hi @dheeru_1994 , 

 

You have to mention in the advanced script, & push the right sys_id for active user. 


If the provided user is inactive, check for condition by gliderecording user table, if he is active true or false, 

if active false, then add additional approval with different user. 

 

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)

View solution in original post

9 REPLIES 9

Sohithanjan G
Kilo Sage
Kilo Sage

Hi @dheeru_1994 , 

 

You have to mention in the advanced script, & push the right sys_id for active user. 


If the provided user is inactive, check for condition by gliderecording user table, if he is active true or false, 

if active false, then add additional approval with different user. 

 

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)

 i select in active user but still creating approver and abel to approve requested item 
but i want to add if user is not active then other user should create approver and approve the requestet item 
how to write script in user activity i am new in scripting 
can you provide me script for that 

@dheeru_1994  , if current Approver is Inactive approval goes to his Manager 

 

   var gr = new GlideRecord("sys_user");
   gr.addActiveQuery();
    gr.query();
    if (gr.next())
        return 'yes'; // take to approval activity
    else
        return 'no'; // skip approval
}
Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

may i to write this in user activity in advance script 
and select inactive user in user field