The CreatorCon Call for Content is officially open! Get started here.

Need to Hide Inactive Users with User ID Ending in '999' from sys_user Table (Not Visible to Anyone)

Ashok_Bandla
Tera Expert

Hi all,

I have a requirement to completely hide certain user records from the sys_user table in ServiceNow.

Requirement:

I want to hide all user records in the sys_user table where:

The user account is inactive (active = false)

The user_id **ends with '999'`

These records should:

Not be visible to anyone, including in lists, forms, reference fields, or searches.

Be effectively hidden from all users.

What I’ve Tried:

I attempted to use a Before Query Business Rule to filter these records out, but it did not work as expected. The records still appear in list views and reference fields.

Goal:

I need a solution (script or configuration) to completely hide these users from being visible in the platform UI, ideally without deleting them from the system.

Any help or guidance on how to implement this correctly would be greatly appreciated.

Thanks in advance!

1 REPLY 1

Rafael Batistot
Kilo Patron

 

hi @Ashok_Bandla 

 

Use a Before Query Business Rule + ACL Restriction


Busines rule:

 

https://www.servicenow.com/community/developer-blog/query-business-rules-a-definitive-guide/ba-p/227...

 

ACL > Read > sys_user table 

 

example code: 

answer = !(current.active==false&&current.user_id.endsWith('999'));


https://www.linkedin.com/pulse/understanding-access-control-lists-acls-servicenow-oscar-lopez-vargas...