The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Email Notification sent to Updated By and Created By persons:

Sankrupa
Mega Expert

I am trying to send email notification to the user who created and updated the record. For that I have created a email notification which triggers the event and send the notification to the person who is logged in and to the specific group. But, now my requirement is to send the email notification to the person who created the record when the other person updates the record. I tried implementing with the mail script with addAddress which takes address from created by field and updated by field. But, its not working. Following is the mail script that I used for the notification.

var user =new GlideRecord('sys_user');

    user.addQuery('user_name', current.sys_created_by);

    user.query();

    while(user.next()){

          //add to cc list      

          email.addAddress('cc', user.email, user.getDisplayValue());

    }

Could you please guide me.

Thank You .

1 ACCEPTED SOLUTION

It didnt work that way. But tried passing as event parameter and working. Thanks for your help.


View solution in original post

8 REPLIES 8

hmm try removing the user.get display name all you need is the cc and the emal addy


Okay.


It didnt work that way. But tried passing as event parameter and working. Thanks for your help.


It didnt work that way. But tried passing as event parameter and working. Thanks for your help.