Email Template Subject line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 08:35 AM
Hi all,
I am in the process of creating email templates in ServiceNow for the Major Incident Module to utilize. One of my requirements is to have the subject line Include the INC# and the short description. I have hit a wall on how to have these two fields pulled automatically. I can get one field to pull but not both. I am sure this a simple script that I am missing. Can anyone help with is?
Example - this pulls the short description,
but I need it to pull both the short description and the INC#
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 08:41 AM
The number would be:
${incident_alert.source_incident.number}
Include that in the template subject.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 08:48 AM
Hi Chris,
As has been suggested you could do ${incident_alert.source_incident.number}.
Then ${incident_alert.source_incident.short_description} as you have already mentioned.
A good pointer is to be wary of which TABLE you the notification for this template is using. For example if it is the 'incident' table then you can just directly reference the incident like so ${incident.number}.
Alternatively, it may be the case that you are using a table that contains a reference to the record and thus you will have to dot walk which is being done in ${incident_alert.source_incident.short_description}.
Note: Make sure there is no 'Subject' that is defined in the Notification from which you are calling the template as this will take precedence anything that is defined in the template.
Thanks,
Ethan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 09:08 AM
So, my only option is use
?
Is there a shorter script option? When I tried to run as above before it would not let me type it all in. Ran into a space issue. And when I shorted up Service Interruption to just Update it does fit but it all appears almost like a sentence with no spacing in it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2019 09:29 AM