Baseline Script Includes and the State Model

The IncidentStateSNC and IncidentState Script Includes provide State constants for use in scripts.

  • Script Includes with SNC in the Name are meant to be read-only. (This ensures the SNC Script Includes are updated during upgrades.)
  • To impose pre-requisites or limits for moving from one state to another, you can incorporate new logic in the IncidentState Script Inclide.
  • To override a function defined in an SNC Script Include, copy that function to the paired version of the Script Include that doed not contain SNC. Paste and customize the function there.

It is considered best practice to refer to States in your scripts using constants
current.state.changesTo(IncidentState.CLOSED) rather than values
current.state.changeTo(7).

State Models currently exist for the Incident and Change application. Visit docs.servicenow.com and search for the following articles for more information on the State Model.

  • State model mapping
  • Add a state to the state model
  • Scripts modified with Incident Management - Core
  • Script includes installed with Incident Management - Core
  • Installed with Change Management - State Model
  • Update change request states

results matching ""

    No results matching ""