Copy work notes from the work order task to the work order and then to the Incident
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 02:10 AM
Hi ServiceNow Community,
We are mapping fields from incident to work order and work order task, which includes work notes, using business rules. We have been able to accomplish this task successfully. However, when the technician adds any work notes in the work order task form, it should be reflected in the incident table's work notes field. Unfortunately, I have not been able to achieve this.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 03:55 AM
Hello @i_sachin_ ,
Please write a before business rule on Incident Task table
(function executeRule(current, previous /*null when async*/)
{
var inc = new GlideRecord('incident');
inc.addQuery('sys_id', current.incident);
inc.query();
if(inc.next())
{
inc.work_notes = "Worknotes from " + current.number +':'+"\n\n" + current.work_notes;
inc.update();
}
})(current, previous);