Copy Work notes from Requested Item to Catalog Tasks using Business Rules
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 ItemWhen to Run - Asynch and on UpdateCondition - Worknotes ChangesScripts -
(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.
Labels:
https://www.servicenow.com/community/developer-articles/copy-work-notes-from-requested-item-to-catalog-tasks-using/ta-p/2299134
