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:55 AM - edited 02-23-2024 01:56 AM
hi @priyanka1028 do you have any worknotes present in RITM? did you pass correct sysid and state value?
Ran in PDI works fine
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 01:57 AM
Yes, I have system work note present in RITM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 01:59 AM
Hi @priyanka1028 then check the query, verify sysid and what is the state of RITM? comment this line in script
//ritm.addQuery('state',3); //comment this line and test
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 02:03 AM
I mean when RITM gets closed the system added comment I want to fetch

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 02:11 AM - edited 02-23-2024 02:14 AM
Hi @priyanka1028 what you want to do with worknotes? are you updating it some where?
in that case create a after update BR on sc_req_item table
Cond: State changesto Close complete
script
var wn = current.work_notes.getJournalEntry(1);
// then your logic here what you want to do with worknotes?
Harish