How to hide HR services from agents while case creation?

Peeyush Jaroli
Tera Expert

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

1 ACCEPTED SOLUTION

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');
Please hit like and mark my response as correct if that helps
Regards,
Musab

View solution in original post

8 REPLIES 8

Musab Rasheed
Tera Sage
Tera Sage

Hello @Peeyush Jaroli ,

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.

find_real_file.png

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi @Musab Rasheed :

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).

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');
Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi @Musab Rasheed ,
for us also same requirement while using this script hr services are not reflecting could you please help on this

Vani14_0-1691201772594.pngVani14_1-1691201797171.png