Script includes are at the heart of scripting in ServiceNow, and are arguably the most commonly used when it comes to writing code. Script includes are used to hold classes of code, and for a lot of the backend script used by the ServiceNow platform.
When creating your script include, you first need to give it a name. This name will be important, as it will be used in other code to call the methods in your script include.
Ensure that the name you choose for your script include does not contain spaces in it. It is best to use underscores to separate words in the name.
Once you enter a name for your script include, you will notice that the API Name and the script fields are populated. The API name is read-only, and given based upon the name of the application this script include is being created in, followed by the name of the script include itself.
The script field...