- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2022 08:32 AM
Hi all,
I have a requirement, copy the work notes content to short description form one catalog task to another catalog task ,copy the work notes to short description form TASK1 to TASK2 and to TASK3.
please help me on this
Thanks,
karishma.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022 09:54 PM
Hi
above code is to copy worknotes to another task wornotes.
try below code
var grScTask = new GlideRecord('sc_task');
grScTask.addEncodedQuery("request_item=" + current.request_item +"^sys_id!=" + current.sys_id);
grScTask.query();
while (grScTask.next()) {
grScTask.short_description = "Worknotes from " + current.number + " : " + current.work_notes.getJournalEntry(1);
grScTask.update();
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2022 07:36 AM
Hi Rohila Voona,
It's not working ,work notes content is not copied in description in one sc_task to another sc_task when state is close complete.
please help me on this,
Thanks,
karishma.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022 09:54 PM
Hi
above code is to copy worknotes to another task wornotes.
try below code
var grScTask = new GlideRecord('sc_task');
grScTask.addEncodedQuery("request_item=" + current.request_item +"^sys_id!=" + current.sys_id);
grScTask.query();
while (grScTask.next()) {
grScTask.short_description = "Worknotes from " + current.number + " : " + current.work_notes.getJournalEntry(1);
grScTask.update();
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2022 05:38 AM
Did you get chance to check my answer?
If your issue is resolved now.
If yes, can you please mark appropriate response as correct for others who may have a similar question in the future and close this unresolved thread.
If not, please let us know if you need any other help
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022 09:48 PM
Hi
Try flow designer
Regards,
Mahesh