- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2016 10:09 AM
Hello,
I need to insert close notes (present in the task table) in the notification which was built on requested item table.
Can you let me know how to achieve this?
Best,
Akshitha
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2016 03:30 PM
Thanks for the clarification. In your message HTML include this:
Close notes: ${mail_script:task_close_notes}
Navigate to System Notification> Email> Notification Email Scripts and create a new record with the name: task_close_notes.
For the script: use this
var scTask = new GlideRecord('sc_task');
scTask.addQuery('request_item',current.getValue('sys_id'));
scTask.query();
if (scTask.next()) {
if (scTask.closed_notes != "") {
template.print(scTask.getValue('closed_notes');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2016 02:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2016 03:30 PM
Thanks for the clarification. In your message HTML include this:
Close notes: ${mail_script:task_close_notes}
Navigate to System Notification> Email> Notification Email Scripts and create a new record with the name: task_close_notes.
For the script: use this
var scTask = new GlideRecord('sc_task');
scTask.addQuery('request_item',current.getValue('sys_id'));
scTask.query();
if (scTask.next()) {
if (scTask.closed_notes != "") {
template.print(scTask.getValue('closed_notes');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 02:00 PM
Hello Chuck,
I was able to achieve the requirement after removing g from the last two lines.
Thanks.
Best
Akshitha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2016 03:07 PM
Sorry for the confusion Akshitha. I've updated the script in case anyone else comes looking for it. I'm glad you got it working despite my terrible typing.
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 01:39 PM
I tried the above code and I was still getting a NULL for the Closed Notes. I have modified the code slightly and I am now getting the expected result, in Madrid.
scTask.addQuery('request_item', current.getValue('sys_id'));
scTask.query();
if (scTask.next()) {
if (scTask.closed_notes != "") {
template.print("<strong>Closed Notes:</strong> " + scTask.close_notes.getDisplayValue());
}
}