When Incident work_notes is updated to empty string via script, Notes section disappears

Bharat Shinde
Tera Contributor

Hi Team,

 

When Incident work_notes is updated to empty string via script, Notes section disappears and shows No Activity.

 

inc.work_notes = "   ";

 

if you look at below image, there are activities..

BharatShinde_0-1753536623306.png

 

But when same incident is updated via script like below:

var inc = new GlideRecord('incident');

inc.addQuery('active',true);

inc.addQuery('number','INC02776931');

inc.setLimit(1 ) ;

inc.query();

if(inc.next()){

    inc.work_notes = "   ";

    inc.state = "2";

    inc.update();

    inc.setWorkflow(false);

}

BharatShinde_1-1753536766258.png


now it shows No Activity even though there are activates if I export the XML and i can found it there.


If i go to sys_journal_field table then i can see blank entry there but even i delete it or update it, still on Incident UI Notes section not loading.

How to fix it as we have multiple Incident records of same?

 

Regards,

Bharat 



5 REPLIES 5

JackieZhang
Tera Contributor

By the way , this is bug for blank work_notes in ServiceNow. It will be fixed in soon.