- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 08-05-2022 12:45 AM
I have explained how to Copy Work notes from Requested Items to Catalog Tasks using Business Rules.
If you have any feedback related to the scripting part, please write it in the comment box.
====================BUSINESS RULES======================
Table - Requested Item
When to Run - Asynch and on Update
Condition - Worknotes Changes
Scripts -
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var sc_task = new GlideRecord('sc_task');
sc_task.addQuery('parent', current.getUniqueValue());
sc_task.query();
while (sc_task.next()) {
sc_task.work_notes = current.work_notes.getJournalEntry(1);
sc_task.update();
}
})(current, previous);
Best Regards,
Prashant
If my article helped you in any way, please mark this as helpful and make this a bookmark.
- 1,331 Views