- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:08 AM
Is there a script available that copies the worknotes entered on a catalog task back to the parent RITM record? We are using the RITM record to provide status back to the users via the portal.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2016 08:15 AM
Hi James,
Nothing out of the box, but you could create a business rule that does this easily enough.
Name: Copy task work notes to RITM
Table: Task (sc_task)
Insert: checked
Update: checked
When: After
Advanced: checked
Condition: Work notes Changes (or in the condition field: current.work_notes.changes())
Script:
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sc_req_item');
if (gr.get(current.parent)) {
gr.work_notes = current.work_notes;
gr.update();
}
})(current, previous);
You said work notes. Change to 'comments' where appropriate if that's what you meant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2016 08:33 AM
The weird part is that with the rules off the RITM does mark itself in a Closed Complete state when the task is closed but with them on.. that behavior is somehow disrupted.
I guess I just assumed that was OOTB behavior to close the RITM when all the tasks were closed. So we'd need to write an extra business rule to do this.. very odd.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2016 08:36 AM
It may be OOB. I just cannot find it on my instance. That doesn't mean I've mucked it up pretty good and it's time for a reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 12:36 PM
We've put in a HI Incident to see what the issue is. They believe it's an ordering issue of scripts being fired but when we know I'll share it here for everyone's benefit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2016 01:43 PM
After much ado and gnashing of teeth it was a simple fix that had both us and the HI folks stumped for a while... lol.
Changed the order of the new business rules high enough so that they happened last. In our case, 1200.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2020 08:17 AM
Thanks Chuck ...this post is really old but Gold.
helped me too 🙂