Retrieve work note from RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 01:17 AM
Hi Team ,
I have one requirement where I need to retrieve the work note comment when RITM is closed and the date and time when it is added on RITM work note.
Please help me by providing your answer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 01:32 AM - edited 02-23-2024 01:34 AM
Hi there,
How/where/etc are you thinking of doing this? Please describe a bit more context.
If its just a before business rule, and just the last work_note, you could just use:
current.work_notes
In a after/async business rule this would already not work. Then you might use:
current.work_notes.getJournalEntry(1)
If you want all entries:
current.work_notes.getJournalEntry(-1)
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 01:33 AM
Hi @priyanka1028 ,
Check if var notes = gr.work_notes.getJournalEntry(1); check if returns the time and date as well.
Other way is to retrieve the latest work notes and then get the sys_id of RITM and then use this sy_id to query journal table using the work notes and then retrieve the date and time, but this will be cumbersome because we need to check if RITM is closed or not at the same time.
Please mark helpful/correct if my response helped you.