Service Now Grid Record insert
■Service Now GlideRecord insert コードサンプル
var incidentGR = new GlideRecord('incident');
incidentGR.query();
incidentGR.newRecord();
incidentGR.short_description = 'TEST 123';
incidentGR.insert();
Service Now Scripts Backgroundでの実行結果
■ Service Now GlideRecord update コードサンプル
var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('priority','1');
incidentGR.query();
while(incidentGR.next()){
incidentGR.priority = '3';
incidentGR.update();
}
■ Service Now GlideRecord delete コードサンプル
var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('priority','1');
incidentGR.query();
while(incidentGR.next()){
incidentGR.deleteRecord();
}