Set recipients in Quick messages

tanz
Tera Expert

Hi,

 

I was able to change subject through before insert and update BR in the sys_email table while sending(condition is type is send-ready). However I would like to change the Recipients too. 

(function executeRule(current, previous /*null when async*/) {

if(current.body.indexOf("Support Group") > -1){
current.subject =" Contant Message Failure";
current.recipients = "Support@m.com";
}

})(current, previous);

Even though the recipients are going correctly in the sys_email , in the form only subject changes and To(which is the recipient) should also be changed which is Support@m.com, which is not happening and is showing the requestor email address. Could you please help me so that the recipients in the sys_email is also shown in the ticket also.

find_real_file.png

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Recipients are not set in Quick messages.

Even if you are able to achieve this requirement; how would you distinguish between email generated from email client vs email generated from notification module OR using gs.eventQueue()

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@tanz 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader