GlideApplicationProperty - Scoped, Global
-
- UpdatedJan 30, 2025
- 4 minutes to read
- Yokohama
- API reference
The GlideApplicationProperty API provides methods to get and set application property values for a specific domain.
Application properties enable service providers to customize application functionality based on the domain. Instead of only having a single system property (System Property [sys_properties] table) that defines the functionality for all domains and users, application properties can be implemented to define functionality for specific domains.
To access this API you must activate the Domain Support - Domain Extensions Installer (com.glide.domain.msp_extensions.installer) plugin.
For additional information on domain-specific application properties, see Domain-separated application properties.
GlideApplicationProperty - getValue(String name, String domainSysId)
Returns the value for the specified application property and domain sys_id.
The list of available application properties is located in the Application Properties [sys_application_property] and Application Property Values [sys_application_property_value] tables.
Name | Type | Description |
---|---|---|
name | String | Name of the application property to return. Note: If the application is not
global, you must prefix the name of the sys_application_property with the
application's scope. |
domainSysId | String | Optional. Sys_id of the domain associated with the application
property. Default: Session domain |
Type | Description |
---|---|
String | Value of the specified application property for the specified domain. If
domainSysId is not passed in the call, then returns the
session domain. If the specified application property doesn't exist, returns the same-name system property value. If the user does not have access rights to the specified domain, throws an exception and no value is returned. |
Example
This example shows how to create a new application property and override its value for ACME and Cisco domains.
GlideApplicationProperty - setValue(String name, String value, String domainSysId)
Stores the specified value in the specified application property for the specified domain, or the current session domain if not specified.
- The application property is not created if its name contains one of the following
strings:
- glide.properties.blacklist
- glide.properties.no_db_override
- glide.properties.safe_overrides
- glide.properties.maint_write_roles
- The application property is not created if there is an existing system property with the same name, and the system property is marked as private.
- The application property is not created if there is an existing system property and the application property does not reference it.
- The name of the application property in the sys_application_property table is prefixed with the application's scope if it is not global.
- This method cannot be called from a different scope.
Name | Type | Description |
---|---|---|
name | String | Name of the application property to save. Note: If the application is not
global, you must prefix the name of the sys_application_property with the
application's scope. |
value | String | Value to store in the specified application property. |
domainSysId | String | Optional. Sys_id of the domain associated with the application
property. Default: Current session domain |
Type | Description |
---|---|
Boolean | Flag that indicates whether the save operation was successful. Valid
values:
If the user does not have access rights to the specified domain, throws an exception and no value is returned. |
Example
This example shows how to create a new application property and override its value for ACME and Cisco domains.