incident record from a sys_id?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2023 11:33 PM
How to get incident record from a sys_id in script??
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 12:33 AM
Yes, make sense.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2023 01:18 AM
var incidentSysId = 'your_incident_sys_id';
var gr = new GlideRecord('incident');
if (gr.get(incidentSysId)) {
var incidentNumber = gr.getValue('number');
var shortDescription = gr.getValue('short_description');
gs.info('Incident Number: ' + incidentNumber);
gs.info('Short Description: ' + shortDescription);
} else {
gs.info('Incident not found.');
}