Skip to content

Internal functions

Richard Szolár edited this page Jan 28, 2020 · 1 revision

We expose some internal functions in the sandbox.

These are there to help you with your development of solutions. These are defined on the node vm and can be used in your Bridge Scripts. These mostly allow you to get access to some Servicenow related data that you may need during the development of your custom solutions.

_getLogID()

You can use the _getLogID() function anywhere in your script. This will return you a sys_id of the created log entry from the instance. This is useful, because you could use this, to send back data to the instance after your script is done or at any point during the execution. You can use the REST API provided by Servicenow for this purpose.

_getData()

You can use the _getData to get the data object/array from the request. This data was sent using the Data bootstrap script which you can use while writing your scripts. The Data bootstrap script is evaluated using the GlideScopedEvaluator from Servicenow. It should only serve to send some data along the script request. You can then use this data in your Bridge script for your own purpose and send back the results.

Clone this wiki locally