- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 08:44 AM
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 .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 09:27 AM
It didnt work that way. But tried passing as event parameter and working. Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 09:20 AM
hmm try removing the user.get display name all you need is the cc and the emal addy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 09:22 AM
Okay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 09:27 AM
It didnt work that way. But tried passing as event parameter and working. Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 09:28 AM
It didnt work that way. But tried passing as event parameter and working. Thanks for your help.