How to add the Additional comments on the requested form

Nikita Gupta1
Tera Contributor

I want to set the additional comments through schedule job.I am able to display the data on the journal table not on requested form.

1 ACCEPTED SOLUTION

That's not a proper way to write additional comments.
You will need to write it by setting the value on the task-record instead.

Something like this:

var incGR = new GlideRecord('incident');
incGR.setLimit(1);
incGR.query();

while (incGR.next()) {
  incGR.comments = 'New additional comment here';
  incGR.update();
  gs.info('Updated incident: ' + incGR.getValue('number'));
}

View solution in original post

6 REPLIES 6

this is not complete script. are you trying to update already existing records?

what is your query to get the records you want to update?


Raghav
MVP 2023

OlaN
Giga Sage
Giga Sage

Hi,

In most cases you can do the same with a Flow, instead of scripting a scheduled job.
Try something like this, and see if it works for you.

Example below

find_real_file.png