Last work notes in Task notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 09:57 AM
Hi All.
I am trying to create a business rule which will be used in a email notification for when a Task has been updated. I would like the latest work notes to appear in the notification. In the business rule script I have current.u_work_notes = current.work_notes; and in the email notification I have Lastest Work Notes ${current.u_work_notes}
This does not seem to be working...any ideas
Thanks
Chris

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 03:01 AM
Hi Pradeep Sharma
I do apologise. Would I change the script from "u_work_notes = current.work_notes" to "u_work_notes = current.work_notes.getJournalEntry(-1);" and in the email notification have Lastest Work Notes ${current.u_work_notes}?
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 10:19 AM
Chris
Display Business rule that will display the last wk
(function executeRule(current, previous /*null when async*/) {
var ia = new GlideRecord('incident');
ia.query('sys_id', current.sys_id);
if ( ia.hasNext() && ia.next() )
gs.addInfoMessage('Last action taken: ' + ia.comments.getJournalEntry(1));
})(current, previous);
Kind regards,
ZA
Do not feel shy to mark correct or helpful answer if it helps or is correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 03:24 AM
Hi Chris,
In the email notification, instead of using ${current.u_work_notes}....use current.work_notes.getJournalEntry(1).
PS: Hit answered, like, Helpful or Correct depending on the impact of the response.