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

You can use ACL or Before Query Business Rule.

 

ACL is recommended, because you don't want query running every time you open the list


Please mark this response as correct or helpful if it assisted you with your question.

Right.. however it doesn't show all the records just using ACL.  The user could have to scroll through a few blank pages just to find the record he was looking for.

If you want to use Before Query BRs, just use them sparingly in my opinion. If you make them very complex, it can cause alot of issues in your instance. I would recommend using ACLs only, and then setup modules that filter down the records so they don't see the records removed errors.

 

The problem with before query BRs is that they run every time any query is done on those tables. so if you do a glide record query in scripting, the before query BRs apply. I have seen this give alot of unwanted results.

 

I can honestly say, after seeing this go badly in an instance, I would almost never apply Before query BRs on a table unless the rule was extremely simple. Even then I would hesitate before doing it.