Does we can hide record from admin

ritu_saluja
Tera Expert

I have a new requirement where we want collaborator to access Employee Relation record only where he is the collaborator and not other records. For that we are assigning him sn_hr_er_admin role through script but now he is able to view/edit all the cases.

What can I do so that he can see the records of employee relation when he is collaborator and not the other records.

4 REPLIES 4

Aditya Raute
Mega Guru

 

 

You should create a new role rather than assigning the sn_hr_er_admin role. With this new role, You will have to create an ACL for that table and disable the 'Admin Overrides' checkbox.

In the Script or condition tab of that ACL, check if the current user is a collaborator on that Employee Relation record. This will ensure that collaborator sees the records they are meant to see and admin cannot see all records.

 

Hope this helps.

Community Alums
Not applicable

Hi @ritu_saluja,

Can you please try to do it by update the ACL

 

Help mark answer helpful and solution

 

Thanks

Akash

Ratnakar7
Mega Sage
Mega Sage

Hi @ritu_saluja ,

 

You can either create read ACLs or Query Business Rule to restrict the particular records.

Please refer below docs:

https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/contextual-security/...

 

https://docs.servicenow.com/bundle/quebec-platform-administration/page/administer/company-and-domain...

 

Thanks,

Ratnakar

 

Basheer
Mega Sage

Hi @ritu_saluja ,

Create Read ACL's and in the ACL formation untick on Admin Override for hiding the records from Admins

in the same ACL you can apply the filter stating collaborator is me;

If you are facing difficulty in applying the filter then write script as below

var answer = false;

if(current.contributer == gs.getUser()){

answer = true;

}

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.