- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2022 12:35 AM
Hi, I have add a list type field which reference the sys_user table.
I can add some users into the list and let the users in this list able to read/write the record.
There are some OOTB ACL which is allow the user who created the record access the record.
"current.opened_by == gs.getUserID()"
For example, for this "Who can access this record" field, Able, Abraham, Alejandra in this list, I would like let them to access this record.
How can I configure ACL by checking list type field?
Please advice.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2022 12:50 AM
In the ACL script you need something as below
answer=false;
if(current.u_who_can_access.indexOf(gs.getUserID())>-1)
{
answer=true;
}
//replace the field u_who_can_access with correct dictionary name of the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2022 01:00 AM
Yes I just wan to know how to create it by script.
Its very helpful.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2022 12:57 AM
Hi,
you can check script mentioned by Jaspal
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader