UI pages
-
- UpdatedAug 1, 2024
- 7 minutes to read
- Xanadu
- Building applications
UI pages can be used to create and display forms, dialogs, lists, and other UI components.
Use UI pages as widgets on dashboards. To find the UI pages, navigate to
.This functionality requires a knowledge of HTML or Jelly. You can also create simple AngularJS applications using UI pages.
Field | Description |
---|---|
Name | Name used to invoke the page via a URL (must not contain spaces). |
Application | Displays the current application scope. |
Description | The description of the UI page and what it’s used for. |
Direct | Select this check box for a direct UI page [sys_ui_page]. A direct UI page doesn't include the common HTML, CSS, and scripts. This setting requires adding custom CSS and JavaScript to use in the page. |
HTML | Main component of the page where you define what is
rendered when the page is shown. It can contain either
static XHTML, dynamically generated content defined as
Jelly, or call script includes and UI Macros. Note: If
GlideRecord/GlideDBQuery is used
instead of GlideRecordSecure, a
security recommendation message displays. |
Client Script | Include client-side JavaScript that runs in the browser,
such as functions called by buttons. It’s intended to handle
any client-side processing needed, like setting focus to a
field or other interactive DHTML features after a page is
loaded. Client scripts for the UI page are deployed to the browser within a <script/> tag, so the content can similarly be defined within the HTML field. The Client Script field can be used instead to define these scripts concisely to maintain the Jelly and HTML manageability. |
Processing Script | Script that runs on the server when the page is
submitted. This is useful if your page has a form defined
with the <g:ui_form/> or
<g:form/> tags. Note: If
GlideRecord/GlideDBQuery is used
instead of GlideRecordSecure, a
security recommendation message displays. |
obsolete-custom-processors | Note: This feature is deprecated. While legacy, existing custom processors continue to be supported, creating new custom processors has been deprecated. Instead, use the Scripted REST APIs. |
Related lists on the form view: | |
Access Controls | View and configure access controls for the UI page. See Use access controls on UI pages for more information. |
Versions | Shows all versions of the UI page. Use this list to compare versions or to revert to a previous version. |
Access control
A UI page can be secured by creating an ACL with the following parameters:
- Type: ui_page
- Operation: read
- Name: Name of the UI page to be protected
- Role: User role that is allowed to access the record

High risk UI pages
- Uses GlideRecord or GlideDBQuery instead of
GlideRecordSecure.Note: This is applicable for HTML and Processing script fields and not Client scripts.
- Does not have a corresponding ACL configured.
- Indicates to be a public UI Page and is entered in the sys_public record.
- Shows a message to indicate high risk UI page.
- For instances with glide.installation.developer is set to true.
- If resource is customized content for a customer instance.
UI page access
Each UI page has a URL computed from the application scope, page name, and the .do file extension.
For example, to display the page called glidewindow_example on the demo system, you would navigate to https://<instance name>.service-now.com/glidewindow_example.do. If the page was part of a custom application called example_app, you would instead navigate to https://<instance name>.service-now.com/x_example_app_glidewindow_example.do.
A common practical example of this might be retrieving a database record for display. To build a list of a user's roles, pass in a parameter with the user's sys_id. Invoke the following UI page to display a list of roles for that user with Jelly code:
role_select.do?sysparm_user=5137153cc611227c000bbd1bd8cd2007
An exception to be careful of, though, is the reserved variable name sys_id. This variable always contains the ID of the UI page itself, regardless of what is specified in the URL. A common substitute variable name is sysparm_id.
Do not use URL parameters to load client scripts in UI pages. The system no longer evaluates scripts that are passed by URL parameter. If your implementation depends on this behavior, you can add the system property [glide.security.disable_ui_pages_sysparm_client_script] and set it to false to temporarily allow the evaluation of URL parameters passing scripts in UI pages.
Use access controls on UI pages
See access controls directly from the UI Page form and add role-based access control when creating or editing a UI Page record.
Before you begin
Access controls that have been added to an existing UI page can be accessed and edited by opening the UI page record under related links.
Role required: security_admin and admin
Procedure
Secure UI pages
Access controls and related security messages are integrated on high risk UI Pages for increased security.
An informational message displays on high risk UI pages to inform the customer to add a role-based Access Control to the UI page.
- If an ACL (access control list) is missing
- If GlideRecord/GlideDBQuery is used instead of
GlideRecordSecure in either the
HTML or Processing script
sections
- If the UI page is configured as public in
sys_public
Note: Public UI Pages that are public or that use GlideRecord don’t show a missing ACL warning.
Conditions that display the security recommendations message
The message displays under the following conditions:
- All internal instances eclipse/IJ where glide.installation.developer=true.
- All customer scoped UI Page resources.
- Any customized UI Page when the glide.script.ui_page.customer_scoped.security_msgs_enabled property is set to true. (The default value is true).
Conditions that don’t display the security recommendations message
The message won’t display under the following conditions:
- UI Page is public.
- UI Page is in the Global scope.
- The glide.script.ui_page.customer_scoped.security_msgs_enabled is set to false.
UI page process scripts
If your UI page contains a form (uses the <g:form> tag), you can submit the form and have the process script run.
The processing script can naturally access fields on the form. For example, if your form contained the application_sys_id field:
If you are using the UI page for a dialog, you can also reference the most recent URL on the stack using the code above and then send the response to that location. This is useful if you want to have the dialog's processing script update something and then redisplay the screen that brought up the dialog.