Name

global.IncidentState

Description

Incident state constants, use these constants when determining which incident state to use. Example - is the incident in the Resolved state var incidentGr = new GlideRecord( incident ); if (incidentGr.get( sys_id ) && incidentGr.state == IncidentState.RESOLVED) // do something when the incident is resolved Example 2 - how to use on the incident form (Load IncidentState into scratchpad) var incidentState = JSON.parse(g_scratchpad.incidentState); g_form.setValue( state , incidentState.NEW); Example 3 - how to use this on the client var ga = new GlideAjax( IncidentState ); ga.addParam( sysparm_name , getIncidentState ); ga.getXMLAnswer(function(answer) { var incidentState = JSON.parse(answer); g_form.setValue( state , incidentState.NEW); });

Script

var IncidentState = Class.create();

IncidentState.NEW                = IncidentStateSNC.NEW;
IncidentState.IN_PROGRESS        = IncidentStateSNC.IN_PROGRESS;
IncidentState.ACTIVE             = IncidentStateSNC.ACTIVE;
IncidentState.ON_HOLD            = IncidentStateSNC.ON_HOLD;
IncidentState.AWAITING_PROBLEM   = IncidentStateSNC.AWAITING_PROBLEM;
IncidentState.AWAITING_USER_INFO = IncidentStateSNC.AWAITING_USER_INFO;
IncidentState.AWAITING_EVIDENCE  = IncidentStateSNC.AWAITING_EVIDENCE;
IncidentState.RESOLVED           = IncidentStateSNC.RESOLVED;
IncidentState.CLOSED             = IncidentStateSNC.CLOSED;
IncidentState.CANCELED           = IncidentStateSNC.CANCELED;

IncidentState.prototype = Object.extendsObject(AbstractAjaxProcessor, {

  getIncidentState: function() {
  	return new JSON().encode(IncidentState);
  },

  type: 'IncidentState'
});

Sys ID

3d9e146f9fa302000391b89a442e7005

Offical Documentation

Official Docs: