sabell2012
Mega Sage
Mega Sage

NOTE: MY POSTINGS REFLECT MY OWN VIEWS AND DO NOT NECESSARILY REPRESENT THE VIEWS OF MY EMPLOYER, ACCENTURE.

 

DIFFICULTY LEVEL:    ADVANCED

Assumes having taken the class SSNF and has good intermediate to advanced level of knowledge and/or familiarity with Scripting in ServiceNow.


PRE-REQUISITE: I developed this example using Scripts - Background and requires the installation of the JavaScriptExtensions file on your instance.

 

In the past I have used the ServiceNow Share to post out code snippets. However, over time those have faded away and been dropped from that repository. Here I have collected together into a Script Include some of my more favorite GlideRecord extension functions, from my articles, that I have shared with the community.

 

I have built these using the prototype template so that you can just add the Script Include to your instance (upload as XML). Since this is a prototype library you will need to "gs.include" it.

 

These have all been tested on my PDI and function with an OOB instance.

 

Instructions for use:

 

To load it up into your instance do the following:

 

  1. Download the sys_script_include_GlideRecordExtensions.xml file attached to this article.
  2. In your instance Navigate to System Definition -> Script Includes. A list view of all Script Includes will be displayed.
  3. Right-Click next to the name field to bring up the context menu.
  4. Click the Import XML link at the bottom of the context menu.
  5. Click the Choose File button.
  6. Navigate to your download folder and pick the file labeled: sys_script_include_GlideRecordExtensions.xml and click the OK button. You will be returned to the import form.
  7. Click the Upload button. The new Script Include will be added to your Script Include list and is then ready for use.

 

I will continue to update this library, in the future, as new functionality presents itself.

 

NOTE: Download and use this software at your own risk. These are simply presented as an example on how to utilize ServiceNow utilities in a Script Include function library.

 

Enjoy!

Steven Bell.

 

If you find this article helps you, don't forget to log in and mark it as "Helpful"!

 

sabell2012_0-1696859966624.png