- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 04:02 AM
I want to copy the close not of CTASK to CR work notes, but the script is not working for CR works notes only.
If i use gr.description instead of gr.work_notes then it copy the Close note and past it to CR description filed, but when i am using "gr.work_notes" then it's not pasting the CTASK close notes to CR worknote, please suggest.
var gr = new GlideRecord("change_request");
gr.addQuery("sys_id", current.change_request);
gr.query();
if (gr.next()) {
gs.log('test3');
gr.work_notes = current.close_notes;
gr.update();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 04:15 AM
Hi @VIKAS MISHRA
Try the below script. It'll work.
var crq = new GlideRecord("change_request");
crq.addQuery("sys_id", current.change_request);
crq.query();
if (crq.next()) {
crq.work_notes.setJournalEntry(current.close_notes);
crq.update();
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 04:15 AM
Hi @VIKAS MISHRA
Try the below script. It'll work.
var crq = new GlideRecord("change_request");
crq.addQuery("sys_id", current.change_request);
crq.query();
if (crq.next()) {
crq.work_notes.setJournalEntry(current.close_notes);
crq.update();
}
Regards,
Siva