- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 01:29 PM
Hello
We are on Jakarta. I have a existing record of REQ and RITM with known sys_id. I want to add an additional worknote to RITM on top of previous worknotes. How can I add programmatically.
I added new record in Journal entry table with RITM sys_id as Element ID, but this newly added worknote is not visible in RITM record. I tried adding as work_notes and work_notes_list, but no luck.
What should I do to update this record so that new worknote is visible? Please advise.
Thanks,
Rajan Mehta
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 01:39 PM
If you know the sysid than you can write directly to RITM. Do something like
var sysid = 'xxxxxxxx';
var req = new GlideRecord('sc_req_item');
req.get(sysid);
req.work_notes = 'Comment notes etc';
req.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 01:39 PM
If you know the sysid than you can write directly to RITM. Do something like
var sysid = 'xxxxxxxx';
var req = new GlideRecord('sc_req_item');
req.get(sysid);
req.work_notes = 'Comment notes etc';
req.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2018 02:19 PM
Thanks Mike.
That worked very well. I used it as below.
(function(){
var req = new GlideRecord('sc_req_item');
req.addQuery('sys_id',"3c67d25fdbea17c0bb4470e21f961928");
while(req.next()){
req.work_notes = ('Comment notes etc');
req.update();
}
})();