- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 02:31 AM
Dear Community Members,
Is there any way I can restrict the visibility of few HR Services (under a fix category) to some group members only and rest of the assignment group members shouldn't have visibility to those HR services?
For example. I have HR Service Payroll Error, I want this HR service should be visible only to people who are part of Payroll Error Management group and not to other groups or their group members, how can I achieve this?
Regards,
Peeyush Jaroli
Solved! Go to Solution.
- Labels:
-
Case and Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 03:28 AM
I don't know if I understand correct but if you want to hide HR service then you can try writing Query BR on HR service table like below.
Condition
gs.getSession().isInteractive() && (!gs.hasRole("admin") || !gs.hasRole("sn_hr_core.admin") || gs.getUser.isMemberOf('Name of group'))
Script :
current.addEncodedQuery('name!=Administrative');
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 02:42 AM
Hi,
check this out
How to allow or restrict a user to select COE while creating HR case
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 03:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 03:13 AM
Hi
I thought of doing something with this function, but this deals with User, while I need HR Service restriction for agents (who are creating case from backend).
Didn't get much of how should I restrict. should I create ACL and restrict and pass it in this function or something else ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 03:54 AM
Hi,
in that function you can check if logged in user is member or not
if not then don't push that HR service in the array
you need to analyze the function and update accordingly
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader