Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Schedule job is not working for Assessment instance table after cloning zurich patch 7

shrutijibhekar
Tera Contributor

Hello @all ,

 

We have created scheduled job and script inlcude where script include called in scheduled job to generate survey records of incident/catalog task of last week on asmt_assessment_instance table, but after cloning on Test instance

 

var id = instId.toString().split(',')[0];

gs.info('QA DEBUG: Assessment Instance ID: ' + id); ---------> this logs giving id

 

 

var inst = new GlideRecord('asmt_assessment_instance');

inst.addQuery('sys_id', id);

inst.query();

gs.info('test 23' + inst.getRowCount());--------> showing test 23 0 id

 

if (inst.next()) {

 

gs.info('QA DEBUG: Updating assessment instance: ' + id);

 

inst.task = currentRecord.sys_id;

inst.trigger_id = currentRecord.sys_id;

inst.trigger_table = currentRecord.getTableName();

inst.u_reference_ticket = currentRecord.sys_id;

inst.update();

 

 

Inside gliderecord logs showing id is 0.

Does anyone have any idea how to resolve this issue.

It will be helpful.

Thank you!

0 REPLIES 0