- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 08:20 PM
Hi Team ,
Need help in the below requirment
Requirment -
whenever work notes are updated in SCTASK, the same notes are automatically copied to the corresponding RITM work notes.
while testing
So all the previous updates from Sctasks are reflected in RITM work notes
what was the mistake , what needs to be update
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 10:14 PM
check this link on how it can be done and it helps in avoiding loop as well
Sync'ing RITM and SCTASK work notes \ additional comments response from Sravani44
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 09:08 PM
@nameisnani What exactly is the question here? getJournalEntry(1 ) should give you the latest worknote from the SC task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 09:23 PM
The problem is here all the previous updates from Sctasks are reflected in RITM work notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 09:16 PM
(function executeRule(current, previous) {
var ritm = current.request_item.getRefRecord();
if (ritm && ritm.isValid()) {
// Get only the newly added work note entry
var newNote = current.work_notes.getJournalEntry(1);
if (newNote && newNote.trim() !== '') {
// Create a formatted entry with SCTASK context
var formattedNote = '[SCTASK: ' + current.number + '] ' + newNote;
// Append to RITM work notes (this adds to existing notes)
ritm.work_notes = formattedNote;
ritm.update();
}
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2025 09:27 PM
after updating the script same issue
ritm
hope you understand the problem here , could you please check above screesnhots .
