- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 07:48 AM
I'm working on a (relatively) simple workflow which creates 2 catalog tasks:
1. First task, send to support group manager for approval and comments in the "work notes" field.
2. Second task to server admins for action
The second task needs to include the work notes from the first field. What's a simple way to accomplish this?
Thanks,
Selena Smith
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2016 09:32 AM
Ahhh... See that is the problem, I was assuming this is on the sc_req_item all the way. Change your script to this, hopefully it will work now.
task.work_notes=pullComments();
function pullComments(){
var comments=[];
var gr= new GlideRecord("sc_task");
gr.addQuery("request",current.getValue("sys_id"));
gr.query();
while(gr.next()){
comments.push(gr.work_notes.getJournalEntry(-1));
}
return comments.join();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 12:08 PM
Is it visible in the activity log too? When you post something in the work_notes, is it visible on the activity log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 12:14 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 12:32 PM
Selena,
If this is on your personal developer instance, I can look into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2016 12:38 PM
I appreciate all your help this afternoon. It's not on my personal developer instance. At this point I might open a HI ticket and see if there's an issue with our instance.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2021 03:30 AM
Bro you are awesome..the code worked.