- 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:48 AM
Hello
HR service visibility is controlled by HR criteria, hence you define proper HR criteria based on group and add that to that particular HR service then you can control visibility and for testing you have select subject person as someone who is part of said group. Don't forgot to mark my answer as correct if that helps.
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 02:56 AM
Hi
HR Criteria will only restrict HR Service for Subject persons. What I am looking is, irrespective of who the subject person is, HR Service should only be visible to selected group members (agents).

- 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
‎08-04-2023 07:18 PM - edited ‎08-07-2023 02:43 AM
Hi @Musab Rasheed ,
for us also same requirement while using this script hr services are not reflecting could you please help on this