Site Name Missing in Email Notifications From ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hi,
I have a request
Could you please include the Site filed as mandatory inclusion in Email notifications such as the below:
Please do not limit the Site inclusion to CINC only but to all ServiceNow work records.
I have completed the work but it works for this notification only, request is to make it work to all ServiceNow work records.
Incident Number: ${mail_script:C8TKT Ticket Commented link to SP}
Subject: ${short_description}
Severity Level: ${priority}
Site (Location): ${location.name}
Requestor: ${opened_by.name}.
Description:
${description}
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
If your notification is on incident table, then
use following line in Message HTML
${location.site}
You can use Notification script as well
Name : name_of_your_script
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template, /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action, /* Optional GlideRecord */ event)
{ if (current.location)
{
template.print("Site: " + current.location.site + "\n");
}
})(current, template, email, email_action, event);
Call notification script in email body : ${mail_script:name_of_your_script}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
so you included location field on email
what's your query then?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Ankur Bawiskar,
I have completed the work but it works for this notification only, request is to make it work to all ServiceNow work records.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Ask customer team which all notifications they want the location to be included
Their requirement should be specific and not generic.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
