Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to add group recipients to bcc

radhaidiotic
Kilo Contributor
Element

u_grp_rec_13

Reference

sys_user_group

15 REPLIES 15

you have to use earlier code also.. that is loop gp and send to bcc...


To CC is working fine:


var groupMember = new GlideRecord('sys_user_grmember');


  groupMember.addQuery('group','c98c5b3b4f3e1200a023ce318110c7b8');


  groupMember.query();


  while(groupMember.next()){


    email.addAddress("cc",groupMember.user.email,"");


}




i tried the same its not working can u help



var GroupMembergr = new GlideRecord("sys_user_grmember");


  GroupMembergr.addQuery("group",current.u_grp_rec_13);


  GroupMembergr.query();


  while (GroupMembergr.next()) {


          //add to bcc list




  email.addAddress("bcc", GroupMembergr.user.email,"");


  }


thanks!


Have you linked this email script with the email notification ?



Thanks,


Mihir


yes   could you please what i need to add above the script