Make template available for multiple groups

  1. I added a GlideList field called Groups (u_groups) at the template form.

  2. Added the following to ACL sys_template read:

u_groups is not empty

  1. Change the answer in Business Rule SNC Template Query like this
var arr_groups = getMyGroups().toArray();
    var str_groups = '';
    for (var i = 0; i < arr_groups.length; i++) {
        if (i == 0) {
            str_groups += 'u_groupsLIKE' + arr_groups[i];
        } else {
            str_groups += '^ORu_groupsLIKE' + arr_groups[i];
        }
    }
    current.addEncodedQuery('^NQ' + str_groups);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章