Need to display the variable data on the RITM worknotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 07:52 AM
Hi All,
I have created one variable on the task level that is "Please provide a description of the shipment issue" (this field is displaying only on the task level not on the RITM level) Once I save the task or close complete the task updating the data to the "Please provide a description of the shipment issue" then I need to update the "Please provide a description of the shipment issue" same data to the RITM worknotes.
Thanks in advance,
Vinuth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 08:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2023 08:26 AM
you can use after update business rule on sc_task table
Condition: current.state Changes to Closed Complete AND current.request_item.cat_item.name == 'Your Cat Item Name Here'
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var ritm = current.request_item.getRefRecord();
ritm.work_notes = current.variables.variableName; // give here the variable name
ritm.update();
})(current, previous);
OR
you can use Run Script as well after the Catalog Task completion
current.work_notes = current.variables.variableName; // give here the variable name
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
09-18-2023 03:56 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader