Dynamically adding To values on Notification

davidhale
Kilo Explorer

I have a requirement which states that email are set to Program Manager which projects are associated to custom form (Meeting Review Form). The notification is configured to be sent when the attachment event is triggered. My issues is to dynamically populate to To value via script. The Wiki shows how to set the below but not the To value.

The only way I can see to do it would be to update the Business Rule that triggered the attachment event (Global), added a business rule to my custom table to trigger a event and pass the user in Parm1.   I don't want to modify the OOB attachment event business rule.   Is there a way via the notification script that I don't see?

...

email.setFrom(current.caller_id.email);

email.setReplyTo("joe.employee@yourcompany.com");

email.setSubject("This is the new subject line");

email.setBody("This is the new body");

.

email.addAddress("cc", "john.copy@example.com","John Roberts");

email.addAddress("bcc", "john.secret@example.com","John Roberts");

Thank you for your assistance is advanced.

5 REPLIES 5

As far as I know, there is no way to set To from the script.I have seen many requirements on setting To from the script. But unfortunately setReplyTo() method never worked.