Live notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2023 12:21 AM - edited ‎09-24-2023 11:20 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2023 03:00 AM
Try something as below.
Create a mail script by navigating to System Notification >> Email >> Notification Email Script and create with name: getnoteslivenotification
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var getworknotesis=new GlideRecord('task');
getworknotesis.addQuery('sys_id',current.document);
getworknotesis.query();
if(getworknotesis.next())
{
template.print('With notes as below \n\n');
template.print('<br>');
var gettextis=getworknotesis.work_notes.getJournalEntry(1).split('(Work notes)')[1];
template.print(gettextis);
}
})(current, template, email, email_action, event);
Call the mail script in the notification's What it will contain tab as below
${mail_script:getnoteslivenotification}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2023 04:19 AM
Hi @Jaspal Singh ,
Thanks for that, It's working well, I have one more doubt, how can I display the latest three work notes in that notification?
Thanks,
Deepika

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2023 04:23 AM - edited ‎09-18-2023 02:59 AM
Replace
var gettextis=getworknotesis.work_notes.getJournalEntry(1).split('(Work notes)')[1];
in the script with
var gettextis=getworknotesis.work_notes.getJournalEntry(1).split('(Work notes)')[1];
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2023 02:01 AM - edited ‎09-24-2023 11:21 PM
working

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2023 03:03 AM
You can try to load all.
var gettextis=getworknotesis.work_notes.getJournalEntry(-1).split('(Work notes)')[1];