- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2025 05:06 AM
In HR Agent Workspace, there is no filter or condition for Opened For and Subject For fields, how can we add a condition here that it should only display users with HR Profile.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2025 01:17 AM
Sharing the solution we've done.
We've replaced and did an override script include in the dictionary entry of Opened For and Subject For fields
Previous reference qualifier:
javascript:new sn_hr_core.hr_Utils().getSubjectPersonUsers()
New reference qualifier:
javascript:new sn_hr_core.nm_hr_Utils().getSubjectPersonUsers()
New script include that will override OOB hr_utils
var nm_hr_Utils = Class.create();
// Override below functions from OOB Script Include: hr_Utils
nm_hr_Utils.prototype = Object.extendsObject(hr_Utils, {
initialize: function() {
// Call the parent constructor
hr_Utils.prototype.initialize.call(this);
},
/**
* Override getHRClientUsers to filter users
*/
getHRClientUsers: function() {
return "active=true^u_employment_type=Employee^ORu_employment_type=Regular Employee";
},
type: 'nm_hr_Utils'
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2025 06:05 AM - edited 10-29-2025 06:08 AM
there is no direct way for this.
If you are talking about HR Agent workspace built on Configurable Workspace then you need to identify the Case Creation page and make changes to the variant by duplicating it.
not so easy thing to do.
this is the "Case Creation Page 2.0" variant which renders the modal, you can search there how the Subject Person and Opened For fields bring the value
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2025 06:12 AM
see this script include "hr_CaseCreateSearchWsSNC" is bringing the filtered records for Subject Person and Opened For
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2025 01:17 AM
Sharing the solution we've done.
We've replaced and did an override script include in the dictionary entry of Opened For and Subject For fields
Previous reference qualifier:
javascript:new sn_hr_core.hr_Utils().getSubjectPersonUsers()
New reference qualifier:
javascript:new sn_hr_core.nm_hr_Utils().getSubjectPersonUsers()
New script include that will override OOB hr_utils
var nm_hr_Utils = Class.create();
// Override below functions from OOB Script Include: hr_Utils
nm_hr_Utils.prototype = Object.extendsObject(hr_Utils, {
initialize: function() {
// Call the parent constructor
hr_Utils.prototype.initialize.call(this);
},
/**
* Override getHRClientUsers to filter users
*/
getHRClientUsers: function() {
return "active=true^u_employment_type=Employee^ORu_employment_type=Regular Employee";
},
type: 'nm_hr_Utils'
});
