Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Write additional comment from case task to case

Community Alums
Not applicable

I have a requirement to write the additional comments from the case task to it's associated case additional comment. I am new with the coding aspect and don't know the best approach or what will work for this. I think a BR will work but I need some help with the code. Can anyone help with this?

1 ACCEPTED SOLUTION

Prince Arora
Tera Sage

@Community Alums 

 

Please write a after update BR as mentioned below

 

PrinceArora_0-1681996936553.png

 

script:

 

var gr = new GlideRecord("sn_customerservice_case");
gr.get(current.parent);
gr.comments = current.comments.getJournalEntry(1);
gr.update();

 

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

View solution in original post

2 REPLIES 2

Prince Arora
Tera Sage

@Community Alums 

 

Please write a after update BR as mentioned below

 

PrinceArora_0-1681996936553.png

 

script:

 

var gr = new GlideRecord("sn_customerservice_case");
gr.get(current.parent);
gr.comments = current.comments.getJournalEntry(1);
gr.update();

 

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

Community Alums
Not applicable

This worked perfectly! Thank you!