Environment variables defined as User Defined Properties in the Identity Management (IDM) Management Console (Home > Environments > [ENV] > Advanced Settings > Miscellaneous) are commonly reused in Java-based business logic, such as BLTH, EventListeners, and ParticipantResolvers.
When configuring JavaScript for a Task Screen Profile Field using FieldContext (or ScreenContext), a similar requirement may arise to load these environment properties within the script initialization logic.
Release: v14.5, v15
User-defined environment properties can be retrieved in JavaScript during field initialization by calling getEnvironmentSettingsProvider() on the FieldContext object.
Use the following example syntax within the init function:
function init(FieldContext) {
var Property_Value = FieldContext.getEnvironmentSettingsProvider()
.getEnvironmentUserDefinedPropertiesDefinition()
.getUserProperties()
.get("MY_USER_DEFINED_PROPERTY");
// Additional logic here
}