JavaScript APIs supported by guarded script
Review the JavaScript APIs that guarded script supports to help you analyze scripts in the Incompatible Guarded Scripts list and either rewrite them or create an exemption for them.
The guarded script evaluator permits the following methods from the ServiceNow server-side JavaScript APIs and the built-in JavaScript APIs. The guarded script evaluator handles scripts that call unsupported APIs differently depending on the transaction type and instance configuration. For more information, see Guarded script evaluator.
ServiceNow JavaScript APIs supported by guarded script
Guarded script permits calling the following methods from server-side JavaScript APIs in untrusted scripts. For more information about server APIs, see Server API reference.
| Class | Method |
|---|---|
| GlideSystem (gs) |
|
| GlideUser |
|
| GlideDate |
|
| GlideDateTime |
|
| GlideTime |
|
| GlideRecord |
|
| GlideBusinessCalendarUtil |
|
| GlideApplicationProperty | getValue() |
| GlidePluginManager | isActive() |
| GlideLocale | get() |
| GlideSessionDebug |
|
| GlideDomainSupport | getCurrentDomainValueOrGlobal() |
| GlideAccessibility | isEnabled() |
| GlideJSUtil |
|
| GlideNumberManager | getNextObjNumberPadded() |
| TableUtils | getAllExtensions() |
| GlideListFilter |
|
| GlideEmailWatermark | optionallyRandomize() |
| GlideCounter | next() |
| GlideProperties | get() |
| GlideTSDebug | enable() |
| DashboardFiltersParser |
|
JavaScript built-in APIs supported by guarded script
Guarded script also permits calling the following methods on JavaScript built-in objects in untrusted scripts.
| Object | Method |
|---|---|
| Array |
Static methods:
Instance methods:
|
| Object |
Static methods:
Instance methods:
|
| String |
Static methods:
Instance methods:
|
| Number (constructor) |
Static methods:
Instance methods:
|
| Boolean (constructor) |
Instance methods:
|
| Date (constructor) |
Static methods:
Instance methods:
|
| Math |
Static methods:
|
| JSON |
Static methods:
|