Differences Among Scripts
From ServiceNow Wiki
1 Overview
Similar to other web tools, ServiceNow applications are accessed via scripting. This page helps you differentiate among 17 ServiceNow scripts.
1.1 Similarities
Most scripts have a name and specify a table.
1.2 Important Differences
The most important differences among scripts are
- the function of the script (what it is used for) and
- whether the script runs on the client or server.
1.3 Client vs. Server
The web browser is the client, and is often the only software that is installed at the customer site.
The application server and the database are located at the data center.
- Client scripts run on the client (which is the web browser)
- Server scripts run on the server (which includes the application server and the database)
The web browser is where you control and communicate with an instance, including communicating with the server and database.
2 17 Scripts - Their Functions and Where They Run
Choose the module name for further information.
| Script | Function | Runs on |
| Access Control | Determines whether access will be granted for a specified operation to a specific entity.
Can be defined by roles, conditional expressions or scripts. | server - script and any condition run on the server |
| Ajax Scripts | Enables the client to get data from the server to dynamically incorporate into a page without reloading the whole page.
|
|
| Business Rules | Customizes system behavior
| server - script and any condition run on the server |
| Catalog UI Policies | Defines the display of a variable set or a catalog item (from the service catalog). |
|
| Client Scripts | Used for making changes to the appearance of forms, displaying different fields based on values that are entered or other custom display options.
Client Scripts can also be called by other scripts or modules, including UI Policies. | client |
| Script Actions | Contains scripts which run when an event occurs, for example
Can have a condition which must be true for the script to run. Commonly used to call a Script Include. | server - script and any condition run on the server |
| Script Includes | Contains scripts which can be functions or classes. These scripts run only when called by other scripts (often Business Rules).
Any server script which is complicated or reusable should be a Script Include (especially complicated Business Rules). | server |
| Transform Maps | Used for importing data.
Do not always include scripts. | server |
| UI Actions | Creates the ability to choose a specific action such as clicking a button or a link.
UI Actions put these items on forms and lists:
|
|
| UI Context Menus | Defines which "right-click menu" will pop-up in which area, and the menu choices that will be available.
Note: If you use a left-handed mouse configuration, right-click means "click the other button." |
|
| UI Macros | Contains modular, reusable components that can contain Jelly and are called by UI Pages. They also contain different types of scripts and may be called multiple times on the same page.
Note: Jelly turns XML into HTML. |
|
| UI Pages | Used to create and display pages, forms, dialogs, lists and other UI components. Can be displayed on a standalone basis, or called as a usable component, as part of a larger page.
Can contain
Note: Jelly turns XML into HTML. |
|
| UI Policies | Defines the behavior and visibility of fields on a form.
Use UI Policies rather than Client Scripts whenever possible.
|
|
| UI Properties | Designates what the instance will look like. |
no scripts |
| UI Scripts | Contains client scripts stored for re-use. Only used when called from other scripts.
Not recommended for use. | client |
| Validation Scripts | Validates that values are in a specified format.
For example, a validation script can verify that the only value allowed in a specific field is an integer. | client |
| Workflow Editor | Used to create or change a workflow. Scripts can be run at any point in a workflow, or different scripts can be run at different points.
Scripts also can be found inside every workflow activity and can be modified (although do so with extreme caution). | server - script and any conditions run on the server |
