ACL: Allow Incident watch list member write access to watch_list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2016 08:20 AM
We can add users to Incident Watch lists to make the incident known to them. We would like to give them the privilege to remove themselves from that watch list or add others.
Testing the condition Watch list contains javascript:gs.getUserID() doesn't work. I'm assuming this is because the watch_list is a glide list.
I have tried to write a script, but this is not working.
var arrayUtil = new ArrayUtil();
var watch_list_arr = current.watch_list.split(',');
if (watch_list_arr.length) {
answer = arrayUtil.contains(watch_list_arr,gs.getUserID());
} else {
answer = false;
}
On a related note, what is the best way to debug an ACL script? I've tried gs.print statements but am not finding any output.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 01:18 PM
I had this problem, and it turned out that while the ACL was set up correctly, the record was being blocked by a Before Query business rule.