- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I need to copy my additional comment from RITM to sc_task . But my sc_task contain group type "Restriction" Only user part of sc_task can able to see the sc_task. So, comment is copying properly.
I tried creating an event + BR + script action but it not working
BR: (After - update)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
in after update BR on RITM, no script action required
BR Condition: Comments Changes
(function executeRule(current, previous /*null when async*/ ) {
var sctask = new GlideRecord('sc_task');
sctask.addQuery('request_item', current.sys_id);
sctask.setWorkflow(false); // disables query BR and allows script to query that record
sctask.query();
while (sctask.next()) {
var comments = current.comments.getJournalEntry(1).match(/\n.+/gm).join("\n");
comments = comments.replace('\n', '');
sctask.comments = comments;
sctask.update();
}
})(current, previous);
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
If something i add in sc_task it will get copy to RITM but now if i add testing in sc_task it is copying to RITM but again the same comment copying from RITM to sc_task duplicate comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
