- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 08:53 AM
Hi All,
I wanted to display the catalog item name in all the service now email alerts, how can i do the same?
Please note i wanted to add this for approval request email, request submitted email, request assigned e mail etc. (need to get the value ir respective of tables)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 09:01 AM
Hi Sreejith,
Make use of Mail Script setSubject function:
email.setSubject("This is the new subject line");
http://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#gsc.tab=0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 09:01 AM
Hi Sreejith,
Make use of Mail Script setSubject function:
email.setSubject("This is the new subject line");
http://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#gsc.tab=0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 09:11 AM
For Approval Table:
The Subject Line should be: Requested Item ${sysapproval} Approval Request for ${sysapproval.item.name}
For Catalog Task Table :
Catalog Item ${request_item.cat_item}: ${number} has been assigned to group ${assignment_group}
For Requested Item Table :
Catalog Item ${cat_item}: ${number} has been Requested.
For Request Table(only one catalog item per request):
Create a mail script and use this code:
var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.sys_id);
gr.query();
if(gr.next())
{
email.setSubject("This is the Request for" + gr.cat_item.name);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 10:46 AM
for approver table it should be ${sysapproval.cat_item.name}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2017 01:34 AM
Thanks Gowrisankar you are really amazing this detailed explanation saved my hours of work.