copying worknotes and comments from child to parent.

gtk
Mega Sage

when agent enter work notes or comments in TASK it copies to its RITM, is it possible to copy the same comments/work notes from TASK to REQUEST.

I have written script in BR

(function ExecuteRule(current.previous /*null when async*/)

{

var gr=new GlideRecord('sc_request);

if(gr.get(current.parent))

{

gr.work_notes=current.work_notes;

gr.update();

}

}

)(current,previous);

its not working, can someone provide solution for this.

PFA

TASK and RITM are sync not for REQUEST

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Use this instead



gr.work_notes=current.getJournalEntry(1);


-Anurag

View solution in original post

5 REPLIES 5

gr.work_notes= current.number + current.work_notes.getJournalEntry(1);


-Anurag