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.

cc people in group

brendanwilson84
Kilo Guru

Hi guys

I have a requirement to send a cc notification to people in a group, the group of people could change depending on what is selected for example assignment group

find_real_file.png

There is currently two people in this group. If I change the assignment group and use another, they could be 2 different people.

I have done a mail script as follows but doesn't seem to be working. I don't have much experience in scripting or coding and would appreciate any advice or help on were I am going wrong.

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,  
                  /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,  
                  /* Optional GlideRecord */ event) {  
email.addAddress("cc",current.assignment_group,current.assignment_group.name);

     

})(current, template, email, email_action, event);

6 REPLIES 6

Have you wrote this in email scripts ?

yes