Name
global.IncidentReason
Description
Incident hold_reason constants, use these constants when determining which incident on hold reason to use. Example - When the incident is on hold and is Awaiting Caller var incidentGr = new GlideRecord( incident ); if (incidentGr.get( sys_id ) && incidentGr.state == IncidentState.ON_HOLD && incidentGr.hold_reason == IncidentReason.AWAITING_CALLER) // do something when the incident is on hold Example 2 - how to use on the incident form (Load IncidentReason into scratchpad) var incidentReason = JSON.parse(g_scratchpad.incidentReason); g_form.setValue( hold_reason , IncidentReason.AWAITING_CALLER); Example 3 - how to use this on the client var ga = new GlideAjax( IncidentReason ); ga.addParam( sysparm_name , IncidentReason ); ga.getXMLAnswer(function(answer) { var IncidentReason = JSON.parse(answer); g_form.setValue( hold_reason , IncidentReason.AWAITING_CALLER); });
Script
var IncidentReason = Class.create();
IncidentReason.AWAITING_CALLER = IncidentReasonSNC.AWAITING_CALLER;
IncidentReason.AWAITING_EVIDENCE = IncidentReasonSNC.AWAITING_EVIDENCE;
IncidentReason.AWAITING_PROBLEM = IncidentReasonSNC.AWAITING_PROBLEM;
IncidentReason.AWAITING_VENDOR = IncidentReasonSNC.AWAITING_VENDOR;
IncidentReason.AWAITING_CHANGE = IncidentReasonSNC.AWAITING_CHANGE;
IncidentReason.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getIncidentReason: function() {
return new JSON().encode(IncidentReason);
},
type: 'IncidentReason'
});
Sys ID
9aab5288c3b30200b6dcdfdc64d3aeb2