Copy Case Additional Comments into Incident

Sunil_th
Tera Contributor

Hi, I'm trying to copy additional comments from Case (Portal) into Incident and created before update business rule, this seems not to work. Can someone assist?

 

Sunil_th_0-1680569919360.png

 

 

(function executeRule(current, previous /*null when async*/ ) {

if (!gs.nil(current.comments)) {
var grInc = new GlideRecord('incident');
if (grInc.get('sys_id', current.incident.sys_id)) {
grInc.comments = 'Work notes update on incident ' + current.number + ': ' + current.comments;
grInc.update();
}
}

})(current, previous);

 

Thanks,

SK

6 REPLIES 6

Hi @AnveshKumar M ,

 

That didn't work. The BR that I created from Incident to Case works great and not sure why the other way around is not working.

 

Thanks,

Sunil

Hi Sunil, 

 

Can you share the br you created from Incident to Case? Thanks