how insert an incident using background script with impact and urgency
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 08:22 AM
how insert an incident using background script with impact and urgency
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 08:24 AM
You can try this in a background script
var inc = new GlideRecord('incident');
inc.initialize();
inc.caller_id = gs.getUserID();
inc.short_description = 'test';
inc.impact =3;
inc.urgency =3;
inc.insert();
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2017 08:29 AM
Hi Hemanth,
Adding to what Alikutty says,
var inc = new GlideRecord('incident');
inc.initialize();
inc.short_description = 'test';
inc.description = 'test';
inc.impact =3;
inc.urgency =3;
inc.insert();
description is mandatory field most of the times.
Regards,
Shariq
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2023 08:33 PM
Hi Hemanath,
inc.initialize();
var inc=new GlideRecord('incident');
inc.setValue('short_description', 'This incident is generated by Script');
inc.setValue('caller_id',gs.getUserID());
inc.insert();
Please find below the query for incident creation.
1. You can use this query in the fix script to insert it manually.
2. Also you can use it in scheduled jobs scripts to insert the incident at any particular time.