2 Replies · Latest reply on Dec 7, 2017 3:54 PM by Paul Morris

    I'm trying to delete record from group members table through run script by getting the list of users and sending the group sys_id. But no luck

      var sec = current.variables.sec_users.toString(); //users list

      var arr = sec.split(',');

      var gr;

      for(var i=0; i<arr.length; i++)


      gr = new GlideRecord('sys_user_grmember');


      gr.user = arr[i].toString();

      gr.addQuery('group','d55742ee4ff5fe40b7103285f110c7c1'); //sys_id of the group

      if (gr.next())