Work Notes & Additional comments , email notification does not show comments in sequence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 12:11 AM
I have configured a watch list notification so that when a Work Notes or Additional Comments are added by anyone in tickets, watch list members should be receiving email notification. This is working as expected , however i am facing a problem with sequence of comments , Example - Work Notes & Additional notes comments shows separate in email notification, refer attached screenshot for more details.
Can anyone help me to understand , how can I receive email notification in sequence for example when work notes are added it should show at top and same should work for additional notes are added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 12:35 AM
You could use a mail script to glide into the sys_journal_field table and return work notes and comments in order, don't think there's any other way to do it.
var gr = new GlideRecord('sys_journal_field');
gr.addEncodedQuery('element=comments^ORelement=work_notes^element_id=' + current.sys_id);
gr.orderByDesc('sys_created_on');
gr.setLimit(6);
gr.query();
while (gr.next()){
template.print(gr.value);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 02:56 AM
Thanks David,
I have tried this but seems still i am doing some mistake, can you please help me with navigation steps to use a mail script to glide into the sys_journal_field table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 03:10 AM
write that script in a mail script, call the mail script something like combined_journal_entries then add it to the message body with syntax ${mail_script:combined_journal_entries}
If you still have issues please elaborate on what they are and what debugging you've done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2019 06:30 AM