- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2020 10:02 PM
Hi All,
I need some help on below requirement
I need to copy work-notes from Incident to Task but with the condition that all the work-notes should be copied only at the time of Task creation and later only recent work-notes should be copied.
-Tahzeeb
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2020 09:35 PM
Hi Tahzeeb,
Are you trying this logic on HR Case and HR Task table? If yes, please follow the below screenshots on Human Resources : Core Scope.
1. BR on HR Case table:
2. BR on HR Task Table
Expected Results:
HR Task:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2020 11:47 PM
Hi Tahzeeb,
You can write an After BR, insert/update on Incident Table
Condition: current.work_notes.changes()
var gr = new GlideRecord('incident_task');
gr.addQuery('incident',current.sys_id); // Incident with which the task is associated
gr.query();
while(gr.next()){
gr.work_notes=current.work_notes.getJournalEntry(1);
gr.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2022 09:56 PM
If there are multiple incident tasks, can we include the task number in the update copied from the incident task to the Incident?