Scripted notification recipients

xiaix
Tera Guru

I have a Notification record on the incident table:

find_real_file.png

 

I want to script the recipient list "Who will receive". 

find_real_file.png

 

How can I script the recipient list?

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

I believe you would have to change send when drop down to  an event is triggered.  An then use a business rule to trigger the event and then on the who will receive  there should be a check box "Event parm 1 contains recipient".  Then and determine in you business rule who will get it and use gs.eventQueue to fire the event.

gs.eventQueue('Event Name', current, list of recipients);

View solution in original post

16 REPLIES 16

Dubz
Mega Sage

If you're cool with adding recipients to cc or bcc then you can use the email.addAddress() method mentioned in the docs Chuck sent. If you want to add them in the 'to' field you'll have to switch it up and trigger the notification with an event, then you can pass through recipients as parm1.

Yes, I want to add to the "to" field, not bcc or cc.