The additional comments are not copied from RITM to the catalog task. when commenting from portal.

Thuraka Srinu
Tera Contributor

Hi team, I am facing an issue where the additional comments are not copied from RITM to the catalog task.

when we are putting the comments on the portal. It is copied to RITM, but somehow comments are not copied from RITM to catalog task which were given from the portal. We have written a business rule and checked that it is working fine, but the comments are not copied.

ThurakaSrinu_0-1672906529713.png

If the portal language is English, the comments are getting copied, but if the portal language is different from English, they are not copied.

ThurakaSrinu_1-1672907570276.png

 

This is the Business which we are using

 

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

// To copy "Additional Comments" from RITM to Catalog Task(s)
if (current.u_worknotes_transfer == false) {
var tasksRec = new GlideRecord('sc_task');
tasksRec.addQuery('request_item', current.sys_id);
tasksRec.addActiveQuery();
tasksRec.query();
while (tasksRec.next()) {
if (current.work_notes.changes()) {
var workNote = current.work_notes.getJournalEntry(1);
var workNote2 = workNote.split('Work notes)\n');
var onlyWorkNote = workNote2[1];
tasksRec.work_notes = onlyWorkNote.toString().trim();
}
if (current.comments.changes()) {

var comment = current.comments.getJournalEntry(1);
var comment2 = comment.split('comments)\n');
var onlycomment = comment2[1];
tasksRec.comments = onlycomment.toString().trim();
}

tasksRec.u_worknotes_transfer = true;


tasksRec.update();

}
} else {
current.u_worknotes_transfer = false;
}

})(current, previous);

 

 

Team can you please help us to find the solution. 

 

 

 

5 REPLIES 5

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @Thuraka Srinu ,

Can you please the Widget of additional comments if there is any restriction applied and allowed only for english language.

Thanks,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

 

Hi Omkar thanks for responding this was the widget we are using there is no restriction applied and allowed only for English language

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @Thuraka Srinu ,

Can you please refer to below link

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/build/service-portal/concept/c_Widg...

Let me know if this finds helpful to resolve your query.

Thanks,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.