Domain separation application properties
Summarize
Summary of Domain separation application properties
The Domain Separation plugin introduces two new tables—System Application Property[sysapplicationproperty] andSystem Application Property Value[sysapplicationpropertyvalue]—to provide service providers with enhanced flexibility for customizing applications that use domain separation. These tables address the limitation of the existing System Properties [sysproperties] table, which is not domain-separated and thus cannot support domain-specific customization required by service providers.
Show less
Key Features
- Domain-aware property overrides: The new tables allow applications to define properties with domain-specific values, enabling different behaviors across domains without modifying code.
- Property resolution logic: When retrieving a property value, the system first checks the Application Property table for a domain-specific override; if none exists, it falls back to the base System Properties table.
- Support for scoped applications: Properties are unique per scope (with scope prefixes) and can be configured per domain and scope, allowing fine-grained customization in scoped apps.
- New fields in the tables: The Application Property table includes fields such as name, description, type, defaultvalue, and references to system properties, while the Property Value table stores domain-specific values and override indicators.
- New APIs: The GlideApplicationProperty API supports domain-separated application properties with new scriptable methods available for both global and scoped applications, enabling programmatic access and management.
Practical Implications for ServiceNow Customers
ServiceNow customers using domain separation can now:
- Configure application properties that behave differently depending on domain context without custom coding.
- Override default system property values with domain-specific settings, such as varying the first day of the week across domains.
- Manage properties with more granularity in scoped applications by leveraging the scope and domain columns.
- Utilize new APIs to automate or script property management tailored to domain requirements.
- Ensure the Domain Extension Installer plugin is activated to access these new tables and features.
Overall, this enhancement simplifies multi-tenant application customization, enabling service providers to better meet individual customer needs through flexible, domain-specific configuration.
The Domain Separation plugin has two new tables to give service providers more flexibility in customizing their applications that use domain separation. These tables are the System Application Property table [sys_application_property] and the System Application Property Value table [sys_application_property_value].
New tables offer more options
With service provider (SP) applications, certain actions can vary depending on the domain. However, the ServiceNow® base system System Properties [sys_properties] table is not domain-separated, so it doesn't satisfy the requirements for applications that use domain separation.
Each SP customer may want to customize their applications differently. Previously, features that could be customized were defined as only one global value. Application developers need a more flexible table. Now you can modify your application without having to create code every time you want to add or change the functionality.
How overrides work in the new tables
Developers typically use the ServiceNow System Property [sys_properties] table to create various functions in applications. If you wanted to develop an application to behave differently in different domains, you'd have to customize it yourself.
In the Paris release, the new Application Property [sys_application_property] table simplifies that customization. Instead of going directly to the System Property table for a value, the application property table goes to the System Application table first. This new table now stores the logic that you require to configure your application. If it finds a property in the new table, it uses that content. If there is no information in that table, it moves on to the base system properties table.
When you configure support for domain separation, you can add domain logic to this new Application Properties table. This table can contain properties that don't exist in the System Properties table. Or you can add properties to the configuration table that can override any property that you select in the System Properties table.
For example, let's say that you want to configure an application with a First day of the week feature. Sometimes, you might want the first day of the week to be Sunday. In other cases, you might want the first day of the week to be Monday. In the base system table, there might be only one Day 1 option, which is Sunday. With the new table, you can store another property, making Day 1, Sunday, and a child domain, Monday.
This figure shows how the system draws properties from the Application Property table before going to the System Property [sys_properties] table.
How scoped apps work in the new table
The new Application Properties table is supported from scoped applications. The application property name, similar to the system property name, is unique, which means that it is prefixed with the scope name if it is not global. The scope of an application impacts your configuration. The scope may determine which Day 1 is defined as Sunday and which as Monday. You can use the same property but customize it so that Day 1, Sunday is the parent domain and Day 1, Monday is the child domain. In the new table, there is both a domain column and a scope column, so you can set these properties for each.
You can use the Expand Domain Scope view in the sys_application_property_value table to show all overrides, as shown in the following image.
If those tables are not available, make sure that you have activated the Domain Extension Installer (com.glide.domain.msp_extensions.installer) plugin.
New application property tables
The new System Application Property [sys_application_property] table contains these fields:
- name
- description
- type (choice of string, true|false, integer, time zone, color, and so on)
- default_value
- property (reference to sys_properties)
- usage_notes
- read_roles
- write_roles
- unique key: (name)
- sys_application_property (ref to sys_application_property)
- sys_domain
- sys_overrides
- value
- unique key: (sys_application_property, sys_domain)
New APIs
The new APIs are also supported in scoped apps. Domain-separated application properties have distinct APIs. The GlideApplicationProperty API has two new scriptable methods, available in both global and scoped applications. See GlideApplicationProperty - Scoped, Global to learn more about these new APIs.