Restricting view of Incidents (ACL)

jayson5
ServiceNow Employee
ServiceNow Employee

Hello Community,

The Incident form has a lot of ACLs, However I need to lock down All HR Incidents to users with an HR Role...I've put the following in for a Read ACL, however it locks everyone out of the Incidents

if the "Functional Area" = Human Resources I want to restrict those Incidents to only users with that role

ACL Script:

current.u_functional_area = 'HUMAN RESOURCES';

Requires Role:

HR

33 REPLIES 33

sam1212
Mega Expert

Hi Jason,



you can try below scenario


condition


functional area is human resources


Acl script


if(gs.hasRole('hr')){


answer = true;


}


else


answer=false;


jayson5
ServiceNow Employee
ServiceNow Employee

I will try this, I will need to lock down the entire HR record for only the HR role folks


Abhinay Erra
Giga Sage

Jason,



  You could have use condition builder instead of scripting. Is this ACL at field level or table level??




Thanks,


Abhinay



PS: Hit like, Helpful or Correct depending on the impact of the response


jayson5
ServiceNow Employee
ServiceNow Employee

Its at the table level, I need to lock down ALL HR incidents unless the user has this HR role. if they have it they can see the HR Incidents...So many ACLs on the Incident table