Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to create new incident using Background script

Leonie1
Kilo Expert

Hi Team,

How to create a new incident from background script.

Thanks

Prakash

1 ACCEPTED SOLUTION

Prins Kumar Gup
Giga Guru

Hi Prakash,

 

Please write this code in the background script

 

var gr = new GlideRecord('incident');
gr.initialize(); 
gr.description = 'Testing'; 
gr.insert();

I hope it's helpful

View solution in original post

3 REPLIES 3

Prins Kumar Gup
Giga Guru

Hi Prakash,

 

Please write this code in the background script

 

var gr = new GlideRecord('incident');
gr.initialize(); 
gr.description = 'Testing'; 
gr.insert();

I hope it's helpful

Thanks, it working

Harish KM
Kilo Patron

insertINC();
function insertINC()
{
var bg = new GlideRecord('incident');
bg.initialize();

bg.fieldname="your value";//example bg.short_description = "test";
bg.insert();
}

Regards
Harish