The CreatorCon Call for Content is officially open! Get started here.

Additional comments(customer visible) copy to RITM

John Vo1
Tera Guru

Currently I have a BR called Work notes to RITM.   This will copy what was put in the task under work notes and pull that up to RITM.  

Here is the script:

find_real_file.png

What do I need to add to the script so additional comments (customer visible) gets copied up to RITM as well?

1 ACCEPTED SOLUTION

Hi John,



Not sure of already got the answer, got some time to do some testing as I promised and here is the test it did:



Type: Business Rule


Table: sc_task


Parameters: Run: Before insert and update


Filter Conditions: Additional comments or work notes changes


Script:


cascadeComment();


function cascadeComment(){


var gr=new GlideRecord("sc_req_item");


gr.get(current.request_item);



gr.work_notes=current.work_notes;


gr.comments=current.comments;


gr.update();


}



And I can see comments and work_notes are updated in activity formatter. Try this and see if this helps



Screen Shot 2017-07-23 at 10.11.23 PM.png



Screen Shot 2017-07-23 at 10.11.30 PM.png



Screen Shot 2017-07-23 at 10.11.44 PM.png



Screen Shot 2017-07-23 at 10.11.56 PM.png


View solution in original post

22 REPLIES 22

shruti_tyagi
ServiceNow Employee
ServiceNow Employee

I guess just add, same how you are doing with work_notes:


gr.comments = current.comments;



before gr.update



Thanks


Shruti


If the reply was informational, please like, mark as helpful or mark as correct!


That comments is for this Additional comments.   But what about the additional comments (customer visible?


find_real_file.png


Oh, Isnt it same, in my instance additional comments (customer visible) is comments:


Screen Shot 2017-07-19 at 10.46.01 AM.png



Shruti


find_real_file.png