Reference Qualifier not working for non admin

coodey1
Mega Guru

Reference to sys_user table variable on cat item.

If user is active or if Deactivation Date is within the last 60 days, user is visible.

 

Expected results:  user is visible in the pulldown if active or if Deactivation Date is within the last 60 days.

 

I have tried with simple and advanced both:

active=true^ORu_deactivation_dateONLast 60 days@javascript:gs.beginningOfLast60Days()@javascript:gs.endOfLast60Days()^nameISNOTEMPTY^u_user_typeINemployee,Contractor/Vendor^sys_id!=javascript: gs.getUserID()

 

Works as expected as admin.  For others, if there is a date in the Deactivation Date field the user is not visible.  Though the impersonated users cannot view users records, the ref qual conditions looking at other fields on the sys_user table have no issues.  It only fails with the Deactivation Date field.  

3 REPLIES 3

James-B
Kilo Sage

If I recall there is an out of box ACL that restricts inactive user records visibility to admin only. 

 

Let me double check my PDI. 

Its a Query Business Rule. 

YOURINSTANCE.service-now.com/now/nav/ui/classic/params/target/sys_script.do%3Fsys_id%3D62a7bfaf0a0a0a6500c49682bd82376a

Condition

gs.getSession().isInteractive() && !(gs.hasRole("admin") || gs.hasRole("user_admin"))

Script

current.addActiveQuery();

 

Sandeep Rajput
Tera Patron
Tera Patron

@coodey1 I recommend you to use Access Analyser to check which ACL/Query BR is preventing users from accessing those records where deactivation date is populated.