Inactive approvers are showing in change and requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 09:58 AM
Hi All,
I want to hide the inactive users before it moves to the approval section.
for example if the user is inactive in snow,we want to hide the user in the change request approval section and service request approval section.
How can i acheive this? if we need to write a glide query on sys approval table.
can anyone share the script
Thanks ,
Chinna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 10:29 AM
Hi Nitin,
Can you pls share the code for this, am new to scripting.
Thanks,
Chinna

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 10:41 AM
Hi
Here is the script to get active sysapprovers.
var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval","your_sys_id");
var grsq = gr.addJoinQuery("sys_user", 'approver' , 'sys_id');
grsq.addCondition('active', 'true');
gr.query();
while(gr.next()) {
gs.print(gr.getValue("approver"));
}
Kindly mark the answer as correct if this works for you.