Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Non-Admin Users Can Only See Active Users in sys_user Table; Inactive Users Not Displaying

SravanthiK67950
Tera Contributor

I'm facing an issue with non-admin users who have the sn_hr_core.case_writer role.

These users are trying to create HR Cases for inactive employees by searching using the employee ID. However, the inactive users are not appearing in the employee reference lookup, while admins can locate them without any issues.

I'm trying to identify where this restriction might be coming from and would appreciate any guidance on what to check.


Has anyone encountered a similar issue where HR Case Writers can only see active users and not inactive users when creating HR cases? What would be the best way to trace the exact source of the filtering?

Any suggestions would be greatly appreciated.


Thanks in advance!

4 REPLIES 4

Anurag Tripathi
Giga Patron

Hi, 

there is an OOB query BR that filters out non active users

AnuragTripathi_0-1789403214695.png

 

-Anurag

Thanks for the response. I confirmed that the OOB user query Business Rule is filtering inactive users.
I tested excluding sn_hr_core.case_writer, and it works, but this may also show inactive users in other fields like Assigned to, Approver and others.
Our requirement is to show inactive users only in the HR Case Subject Person field.
Is there a recommended way to achieve this without modifying the OOB user query Business Rule?

@SravanthiK67950 Unfortunately, the query BR will always kick in on the sys_user table unless you apply a role check. This is a long standing problem and except applying the role check there is no alternative solution. Please do not deactivate the BR as it applies on several reference fields across different product lines and filters.

Try the solution mentioned here. 

Solved: Bypass query business rule for catalog variable - ServiceNow Community

 

You can also check this post , look at the section for getting around Query BR.

Query Business Rules: A Definitive Guide - ServiceNow Community

-Anurag