How to create an Emergency type change using Script - Background

Nithin_kumar
Tera Contributor

Hello Folks,

 

I am trying to create Change requests from the Script - Background. But am unable to create Emergency type change using the below script. Could you please correct me what am missing?

 

var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'emergency';
chg.short_description = "test change request";
chg.insert();

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi,

 

Please find the below script to create an emergency change:

 

Emergency:

var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'emergency'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='62d10fa1c303101035ae3f52c1d3aec1';
chg.insert(); 

 

Please mark the answer correct/helpful accordingly::.

View solution in original post

1 REPLY 1

Community Alums
Not applicable

Hi,

 

Please find the below script to create an emergency change:

 

Emergency:

var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'emergency'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='62d10fa1c303101035ae3f52c1d3aec1';
chg.insert(); 

 

Please mark the answer correct/helpful accordingly::.