Skip to content

Commit d007912

Browse files
authored
Add README for Domain Separation Current Domain Display
Added documentation for the Domain Separation Current Domain Display functionality, including an overview, components, methods, and usage instructions.
1 parent 3da240b commit d007912

File tree

1 file changed

+20
-0
lines changed
  • Client-Side Components/Client Scripts/Show Current Domain

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Domain Separation Current Domain Display
2+
Overview
3+
This functionality provides real-time awareness to users about the current selected domain within ServiceNow's Domain Separation framework. It displays an informational message on form load indicating the active domain context, helping prevent accidental configuration or data entry in the wrong domain.
4+
5+
Components
6+
Script Include: DomainCheckUtil
7+
Global, client-callable Script Include allowing client scripts to query the current domain name via GlideAjax.
8+
9+
Methods:
10+
isCurrentDomain(domainSysId) — Checks if a given domain sys_id matches the current session domain.
11+
12+
Client Script
13+
An onLoad client script configured globally on the Global table, set to true to load on all forms.
14+
Calls the Script Include via GlideAjax to retrieve current domain name asynchronously.
15+
16+
Displays the domain name as an informational message (g_form.addInfoMessage) on the form header on every page load.
17+
18+
Usage
19+
Upon loading any record form, users see a message stating:
20+
"You are currently working in Domain Separation domain: [domain_name]."

0 commit comments

Comments
 (0)