- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 04:32 AM
Is it possible to use HR Criteria to hide some HR Services in the backend when creating a ticket/case? I saw some recommendations to use a query BR but I'm still wondering if it's possible to utilize HR Criteria to hide specific HR services.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 06:59 AM
Hello @Community Alums -
Are you looking to hide the cases once they are created, between hr groups?
For example: once the hr payroll team creates a case using Payroll Discrepancy hr service, now no other group can see that case.
If that is what you are looking to do, then I would suggest using CoE Security Configuration(s). You could create a Read and a Write CoE Security record to look something like this:
Here I am signed in as an HR Agent that is in the HR Benefits assignment group, and I cannot see a payroll case:
Here I am signed in as an HR Agent that is in the HR Payroll assignment group, and I can see the payroll case:
However, IF you are looking to hide services before the case is created, as in being hidden when the agent is creating a case from the Case Creation Page. Then yes, you would need to create something else, like a business rule to remove those options based on the signed in user.
If you needed to hide a service like this, then the BR would need to be a query type for When to Run:
(function executeRule(current, previous /*null when async*/ ) {
// Get the current logged-in user
var userId = gs.getUserID();
// Check if the user is in the HR Payroll group
var isPayrollTeam = false;
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', userId);
gr.addJoinQuery('sys_user_group', 'group', 'sys_id')
.addCondition('name', 'HR Payroll');
gr.query();
if (gr.next()) {
isPayrollTeam = true;
}
// If the user is not in the HR Payroll team, filter out the 'Payroll Discrepancy' service
if (!isPayrollTeam) {
// Add a query condition to exclude the 'Payroll Discrepancy' service
current.addQuery('name', '!=', 'Payroll Discrepancy');
}
})(current, previous);
Here I am as a person in the HR Payroll Group:
Here I am as someone NOT in the HR Payroll Group:
You can see that the normal Payroll Discrepancy is missing, but the alumni is still there of course.
Please remember this is all built on me using this one service as an example.
So, based on which direction you are looking for;
- Hide HR Service(s) before case is created, you could use a query business rule
- Hide HR Service(s) after case is created, you could use CoE Security Configuration
I hope this helps you out!
Please keep us posted if you need additional help or run into issues.
Cheers,
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 06:59 AM
Hello @Community Alums -
Are you looking to hide the cases once they are created, between hr groups?
For example: once the hr payroll team creates a case using Payroll Discrepancy hr service, now no other group can see that case.
If that is what you are looking to do, then I would suggest using CoE Security Configuration(s). You could create a Read and a Write CoE Security record to look something like this:
Here I am signed in as an HR Agent that is in the HR Benefits assignment group, and I cannot see a payroll case:
Here I am signed in as an HR Agent that is in the HR Payroll assignment group, and I can see the payroll case:
However, IF you are looking to hide services before the case is created, as in being hidden when the agent is creating a case from the Case Creation Page. Then yes, you would need to create something else, like a business rule to remove those options based on the signed in user.
If you needed to hide a service like this, then the BR would need to be a query type for When to Run:
(function executeRule(current, previous /*null when async*/ ) {
// Get the current logged-in user
var userId = gs.getUserID();
// Check if the user is in the HR Payroll group
var isPayrollTeam = false;
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', userId);
gr.addJoinQuery('sys_user_group', 'group', 'sys_id')
.addCondition('name', 'HR Payroll');
gr.query();
if (gr.next()) {
isPayrollTeam = true;
}
// If the user is not in the HR Payroll team, filter out the 'Payroll Discrepancy' service
if (!isPayrollTeam) {
// Add a query condition to exclude the 'Payroll Discrepancy' service
current.addQuery('name', '!=', 'Payroll Discrepancy');
}
})(current, previous);
Here I am as a person in the HR Payroll Group:
Here I am as someone NOT in the HR Payroll Group:
You can see that the normal Payroll Discrepancy is missing, but the alumni is still there of course.
Please remember this is all built on me using this one service as an example.
So, based on which direction you are looking for;
- Hide HR Service(s) before case is created, you could use a query business rule
- Hide HR Service(s) after case is created, you could use CoE Security Configuration
I hope this helps you out!
Please keep us posted if you need additional help or run into issues.
Cheers,
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 07:02 AM
Thanks Rob! This clarified everything to me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 07:08 AM
Awesome - glad I was able to help you out!
Take care,
-Rob