Skip to main content


persistent class Security.Domains extends %Library.Persistent, %XML.Adaptor, %SYSTEM.Help

SQL Table Name: Security.Domains

This class defines the security domains for a system.
Domain names have the following properties:
1) Domain names are case insensitive.
2) Maximum length of a domain name is 64 characters.
The %Admin Secure:USE permission is required to operate on a domain

The table for this class should be manipulated only through object access, the published API's or through the System Management Portal. It should not be updated through direct SQL access.

Method Inventory


classmethod InUse(Name As %String, ByRef InUse As %Boolean = 0, ByRef Users As %List, ByRef MoreUsers As %Boolean = 0) as %Status
Checks if the domain is in use.
Checks if the domain specified is used by any user.
Name - Name of the domain to check.
Return values:
InUse = 0 Not used
InUse = 1 Used
Users = $list of users the domain is used by or null if none
MoreUsers = 0 - Entire list of users using the domain returned
MoreUsers = 1 - Entire list of users using the role Not returned
If MoreUsers=1, and you wish to get the entire list of users using the domain, use the following code:
s x=##Class(Security.Domains).InUse("Domain1",.InUse,.Users,.MoreUsers) While (MoreUsers) {
s SaveUsers($i(i))=Users
s x=##Class(Security.Domains).InUse("Domain1",.InUse,.Users,.MoreUsers)


index (NameIndex on NameLowerCase) [IdKey, Type = key];
Index methods: NameIndexCheck(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods


Storage Model: Storage (Security.Domains)

FeedbackOpens in a new tab