Reference Qualifier not working for non admin
This content was last updated in 2024. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 10:51 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 07:10 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 07:34 AM
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();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 08:28 AM
@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.