ACL: Allow Incident watch list member write access to watch_list

perkinsarm
Mega Guru

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.

10 REPLIES 10

Luc_Sutherland
Tera Expert

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.