- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 09:14 PM
Hi Team ,
can anyone please help me on this requiement .
Ony for particular catalog item ' Snow Support '
whenever sctask worknotes is updated the same comments should copy in ritm additinal comments .
how to configure , can any one please help me .
@Ankur Bawiskar Please help me here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 09:24 PM
you can use after update business rule on sc_task
Condition: Work notes Changes && current.request_item.cat_item.name == 'Your Item Name'
Script:
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var ritm = current.request_item.getRefRecord();
ritm.work_notes = current.work_notes.getJournalEntry(1);
ritm.update();
})(current, previous);
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-03-2025 11:00 PM
while doing testing
i have attached - attachment in sctask - but is not copied to assiocated ritm @Ankur Bawiskar
could u please hlep me here what was the issue here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 11:50 PM
I informed to use after insert business rule on sys_attachment
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-03-2025 10:32 PM
Hi @nameisnani ,
Good day !!
Create an After (Update) Business Rule on sc_task, and in when to run in first tab, select trigger only when Work Notes change AND the parent RITM is the specific catalog item “Snow Support”...
(function executeRule(current, previous) {
if (!current.work_notes.changes()) return;
var ritm = new GlideRecord('sc_req_item');
if (!ritm.get(current.request_item) ||
ritm.cat_item.toString() != 'sys id of catalog item')
return;
var wn = current.work_notes.getJournalEntry(1);
if (!wn) return;
var prev = ritm.comments.getJournalEntry(1);
if (prev && prev.indexOf(current.sys_id) > -1) return;
ritm.comments = 'From ' + current.number + ':\n' + wn + '\n(via task ' + current.sys_id + ')';
ritm.update();
})(current, previous);
Additionally, you can use flow designer to achieve the same task...
Give it a try and let me know...
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/