acl to allow members of the watchlist of a table to be able to read
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 01:20 PM
how to adjust an acl to allow members of the watchlist of a table to be able to see the record in a read only state. its a non request table
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 09:40 PM
@DevtoSME You need to update the read ACL of the table where you would like to grant access of watchlist users to have access to the record.
In the ACL script, check
if(current.watchlist.indexOf(gs.getUserID())>-1)
{
return true;
}
else{
return false;
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 10:06 PM
var currentUser = gs.getUserID();
// Get the watchlist of the current record
var watchlist = current.watch_list.toString(); // Assuming 'watch_list' is the name of the watchlist field
// Check if the current user is in the watchlist
if (watchlist.indexOf(currentUser) != -1) {
// Grant read access
answer = true;
gs.info("User " + currentUser + " is in the watchlist. Allowing read access.");
} else {
// Deny access
answer = false;
gs.info("User " + currentUser + " is not in the watchlist. Denying read access.");
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks