Array of users in Business rule for Event of email notification

anubhavr
Giga Expert

I want to add some particular user like 'Abel tutor' and also some users in a particular user field in an array and send email notifications to those users. How can I implement it?

For example: If the 'u_user1' reference field contains 'Beth Auther', and 'u_user2' reference field contains 'Arun Sharma', I want to send email notification to all 3 users (Abel tutor, Beth Auther, Arun sharma) through event based on the conditions of other fields.

7 REPLIES 7

var usrs = [];



var obj = '';


var gr= new GlideRecord('sys_user');


if(gr.get('name', 'Abel Tuter')){


  obj   = gr.sys_id.toString();


}



  if (current.notifications=='true')


  {


  usrs.push(current.delegate);


  }


  if (current.u_cc_jsnead == 'true')


  {


  usrs.push(obj);


  }


  gs.eventQueue('manage.proxy.notify', current, usrs, "" );






Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


Hi,



Still not working. Where can i be going wrong??


Are you mean User id ?



Use : gs.getUserName()


Example :



user.push(current.u_user1. gs.getUserName());



Thanks,


Syed