Question on Scheduled Job

Priyadarshini M
Tera Contributor

Hello there,

  I have a Scheduled job requirement, in that i need to create a new Incident Using Scheduled Jobs and that incident should contain( Following field values should be capture in Incident record using Scheduled job) 
 Short Description
 Description 
 Assignment Group "ABC"
 Category set To "Network"
 Priority Set To "Moderate" 
 

Thanks,

Priyadarshini

2 REPLIES 2

OlaN
Giga Sage
Giga Sage

Hi,

Have you looked at Flow designer?

This could easily be done with a scheduled Flow instead.

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Priyadarshini Madyapagol ,

 

You can use below code for that :-  

 

var gr = new GlideRecord('incident');

gr.initialize();

gr.description ='Testing';

gr.short_description='Test1';

gr.assignment_group='477a05d153013010b846ddeeff7b1225'; //

gr.impact='2';

gr.urgency='2';

gr.insert();  
 
 
 

Please mark my answer as helpful/correct if it resolves your query.

 

Regards,

Gunjan Kiratkar

Consultant - ServiceNow, Cloudaction

Rising Star 2022

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy