- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2020 07:41 AM
Hi All,
I am a bit stucked in mail notifcation.
I have a notification that send email to people when someone initiates transaction from UI action.
>I was solving using the 'event creator ' checkbox , strangely it dont work.. (Event triggered notification)
So lets say User A initiated and click button and now mail needs to go to User B and C
with this check box on : it should trigger to B ,C and also to A(event creator).
>Another approach is i was the id of user to the mail script and use
(Event triggered notification)
call mail script for the mail notification
So recipients are in Event.param2 and cc needs to be there from mail script as below
email.addAddress('cc', userEmai);
I cannot use last param of event as the CC or the fixed logged in user and content needs to be passed via that dynamically..
I don't know what I am doing wrong. similar situation worked well in past.
Thanks in Advance..
Abhinab
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020 03:24 AM
yes. even the hardcoded didnot work either.
The problem is may be it donot apear in email logs but mentioned in copied may be that is how it works and not come as a separate in email logs.
In my instance outgoing emails are blocked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2020 11:10 AM
Hello Abhinab,
When the notification is triggered, check the logs and see if the notification is triggered to all recipients. If any of the recipient email address is blank or user is inactive/locked out then notification for that user will not be triggered, but you can see that in the logs.
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 12:45 AM
It is triggered for all others
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 01:12 AM
Hi Abhinab,
So email is triggered for all recipients.
Is email not triggered to cc? Is that an issue?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020 11:03 AM
yes.. So the user that has triggered the email should come in CC for the same email that are triggered to the user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 03:19 AM
Hi Abhinab,
So cc user is not set correctly? since you require cc to be set to the user who triggered you can use gs.getUserID()
Did you check this by adding logs?
event.user_id -> this comes to sys_id of the user or not
if nothing comes for this then use gs.getUserID()
var user = new GlideRecord('sys_user');
user.addQuery('sys_id',gs.getUserID());
user.query();
if(user.next()){
gs.log(user.email.toString()+user.name.toString(),'abhi6567');
email.addAddress("cc",user.email.toString(),user.name.toString());
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader