Copy Additional Comments from Request to RITM

TStark
Kilo Sage

Can anyone provide some insight on the proper script for the Business Rule that will allow Additional Comments created on the Request to automatically copy to the RITM? I tried using the following with no luck.

Create an after business rule on sc_request table

-When: after insert and update
-Conditions: Additional comments changes
-Script:

var gr= new GlideRecord("sc_req_item");


gr.get(current.getValue("request_item"));


gr.comments=current.comments.getJournalEntry(1);


gr.update();

Thanks,
AJ

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello

var gr = new GlideRecord('sc_req_item'); gr.addQuery('request',current.sys_id);

gr.query(); while(gr.next())

{

gr.comments = current.comments;

gr.work_notes = current.work_notes;

gr.update();

}

Please mark answer correct/helpful based on impact

View solution in original post

17 REPLIES 17

That is not supported by the screenshots attached. Judging by the screen-shots attached, all that happens is that the mail is associated with the current record. I mean picture

find_real_file.png

does not show an Additional comment, just simply an e-mail and it's contents.

You're right Janos. What's weird is when I reply to the RITM email the email shows as Additional comments and not as "Email Received".

 

find_real_file.png

That indicates that you have an Inbound Action form Requested Items, but not for Request. Or you do have in Inbound Action for Requests too, but it is not programmed to add the contents of the e-mail as an Additional comment.