- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 09:43 AM
Hello Team
I have an issue related to email notification. We have a reference field in one of our catalog item. I'm trying to add this field in the 'Who will receive' tab in the notification,
but couldn't find the way. The point here is, upon resolution of the RITM, this notification should be triggered to the user's ( who is in the reference field ) manager.
Any idea on how to add this users ( scott hatch ) manager to be added in the 'users/group in field' list ?
Regards!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2017 08:24 PM
Hi Nitin,
If you noticed, I have declared a variable named 'recipient' in my last response. I'm passing that variable inside gs.eventQueue() function. The syntax of object.eventQueue() can be understood from the section 3.1 of this link GlideSystem - ServiceNow Wiki . If you are trying to send the email to the person who is selected in the reference field in the variable then you must define the variable as var recipient = current.variables.variable_name; If you are trying to send the email to the manager of the selected person then it would be like var recipient = current.variables.variable_name.manager; Reference field always passes the sys_id of any user, so you do not have to write recipient.name.
For your 2nd question, the answer will be YES. But you must remember the logic of call the same event must be different and same a single notification should be defined. Otherwise, whenever you are calling the same event from multiple business rules for multiple logic, the same notification will get triggered (considering the notification is selected as Event is fired with the same event).
Please try again now and let me know if you face any problem.
I hope this helps.Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 04:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-28-2023 03:57 AM
Hello @Nitin_NOW According to your Question I Understood that Sometimes we could not able to find a way to dot walk to some of the Fields in the [who will receive tab] but there is a simpler way where you can acheive your requirement.
So By using background Script and Gliding to [sysevent_email_action] with the [Current Notification Sys_id] Try to Change the Required Fields you want and use current.update() and run the BG.And Once the BG has been Run then Try Refreshing the Notification you will find your requirement to be completed.
For your Reference im adding the Background Script Please Review it :
var current = new GlideRecord("sysevent_email_action");
if (current.get("Sys id of the Notification")){
current.recipient_fields = 'company.ref_customer_account.u_service_coordinator_group';
current.update()
gs.info(current.recipient_fields);
}