Restrict groups from Hr Service case creation

Andre Jones
Tera Expert

Hello,

 

I've created several groups ASD, ASS, and ADA. They should not have access to Report Misconduct HR Service.

AndreJones_0-1701730602608.png

 

 

 

I don't want them to be able to read, write or delete. I notice that you cannot write ACL's towards HR Services. I tried doing the COE Security Configuration route but it only allows for read/write restrictions. 

 

What should I do?

11 REPLIES 11

It did not work.

 

var hrServices = new GlideRecord("sn_hr_core_service");

                    if (gs.getUser().isMemberOf('542b8b1b47323110437db1a8536d43f4')) { // sys_id of the group

                        hrServices.addQuery("name", "!=", "Negotiations"); // name of HR service that will not be visible }

                    }

                        hrServices.addActiveQuery();

Max Dore
ServiceNow Employee
ServiceNow Employee

Just a reminder that best practice dictates you should not hardcode names or sysids. You should use system properties instead to help with maintenance and scalability.