Best way to restrict access to certain records in a table based on a field value

Josh Ferree
Mega Contributor

I'm looking for a way to restrict access to certain records depending on who it is that's looking at it.

For example, say I have 5 records.  2 of them have AA in a field, 3 of them have BB in that same field.  I want to allow certain people access to view and/or modify the AA records, but not BB.  I figured setting a custom list field in the sys_user table to add which records I want them to have access to would work, but I'm struggling finding a way to restrict the access based on this.

 

Thank you all in advance!

7 REPLIES 7

Anurag Tripathi
Mega Patron
Mega Patron

ACL is the way to go my friend

 

Let me know if you need help to configure it too.

-Anurag

I was figuring ACL.. Would I be using gsUserID().getRecord().u_field on it?

pranav_parmar
Kilo Contributor

You can use the Access Controls to define those at row level. This is the most easiest way to block record level access. You can find more details on docs: 

 

https://docs.servicenow.com/bundle/jakarta-platform-administration/page/administer/contextual-security/concept/access-control-rules.html

 

Josh Ferree
Mega Contributor

I've been doing some research, and it looks like a mix of ACL and before query business rules may do the trick.