Creatio 8 Atlas uses the sdk.SysValuesService service to manage system variables.
In Creatio 8 Atlas, you can access system variables differently from the previous versions. In this version, write the system variable name in lowercase without _ delimiters and the CURRENT prefix. View the complete list of system variables in a separate article: System variables list in Freedom UI.
To display the value of a system variable on a page:
- Add a page inscription to display the values of system variables on step 1 of the Freedom UI page customization procedure if needed.
-
Set up how to display the value of a system variable on the page on step 2 of the Freedom UI page customization procedure.
-
Enable the sdk.SysValuesService system variable service. To do this, add the @creatio-devkit/common dependency to the AMD module.
View an example that adds a dependency to the UsrAppClientSchemaName AMD module below.
- Add an attribute that stores data to the viewModelConfig schema section. Add the attribute similarly to the procedure for setting up the field display condition.
- Bind the caption property to the corresponding model attribute in the viewConfigDiff schema section. Bind the property similarly to the setup procedure for the field display condition. Instead of the visible property, use the caption property that displays the text in the element.
-
Add a custom implementation of the crt.HandlerViewModelInitRequest system query handler to the handlers schema section. The handler is executed when the View model is initialized. Depending on the value of the attribute (true or false), the handler executes different business logic.
- Instantiate the system value service from @creatio-devkit/common.
- Load system values.
- Calculate the value and write the calculation result to the corresponding attribute if needed.
View an example of a crt.HandlerViewModelInitRequest query handler with someVariable calculation result written in the SomeAttributeName attribute below.
-
Detailed example: Display the values of system variables on a page.
1. Set up the page UI
- Create a custom System variables app based on the Records & business processes template. To do this, follow the guide in the user documentation: Create a custom app.
- Open the System variables form page page in the working area of the System variables app page.
- Delete the Name field the Requests form page page includes by default.
-
Add the label of the current contact.
- Add a Label type component to the working area of the Freedom UI Designer.
-
Click
in the action panel of the Freedom UI Designer and fill out the label properties in the setup area.
- Set Title to "Current user."
- Select "Caption" in the Style property.
- Select gray in the Text color property.
-
Add the following labels in a similar way:
- the value of the current contact name from the system variable
- the time offset from UTC
- the time offset value from UTC from the system variable
View the properties of the labels to add in the table below.
Label property valuesElement Property Property value The label that contains the value of the current contact name from the system variable Title "Current user (value)" Style Select "Body text" The label of the time offset from UTC Title "Contact time offset" Style Select "Caption" Text color Select the gray color The label that contains the time offset value from UTC from the system variable Title "Contact time offset (value)" Style Select "Body text" - Click
in the action panel of the Freedom UI Designer. After you save the page settings, Creatio opens the source code of the Freedom UI page.
2. Set up the retrieval of system variable values
Configure the business logic in the Client Module Designer. For this example, set up the retrieval of system variable values
-
Enable the sdk.SysValuesService system variable service. To do this, add @creatio-devkit/common to the AMD module as a dependency.
-
Add the following attributes to the viewModelConfig schema section:
- CurrentUser. Stores the name of the current contact.
- ContactTimezone. Stores the time offset in hours between the time zone of the current contact and UTC.
-
Change the caption property value in the viewConfigDiff schema section:
- $CurrentUser for the CurrentUserValue element
- $ContactTimezone for the ContactTimeOffsetValue element
The caption property handles the text contained in the element.
-
Add a custom implementation of the crt.HandlerViewModelInitRequest system query handler to the handlers schema section. Execute the handler when Creatio initializes the View model.
- Create an instance of the system value service from @creatio-devkit/common.
- Upload the system values.
- Specify the name of the current user contact in the CurrentUser attribute.
- Convert the time zone offset value from minutes to hours and specify the converted value in the ContactTimezone attribute.
Complete source code of the page schema - Click Save on the Client Module Designer's toolbar.
Outcome of the example
To view the outcome of the example:
- Open the System variables app page and click Run app.
- Click New on the System variables app toolbar.
As a result, Creatio will display the name of the current user and the time offset value in hours between the time zone of the current contact and UTC on the record page of the custom System variables section. The values will be retrieved from the corresponding system variables.

In Creatio 8 Atlas, you can access system variables differently from the previous versions. In this version, write the system variable name in lowercase without _ delimiters and the CURRENT prefix.
|
|
|
---|---|---|
|
|
Maintainer. Use the Publisher (Maintainer code) system setting to set the value. Learn more: Configuration (user documentation). |
|
|
Max length of entity schema name |
|
|
Precision of decimals in the displayed multicurrency control |
|
|
Primary language |
|
|
Username |
|
|
Account linked to the user |
|
|
Contact linked to the user |
|
|
Creatio UI language of the current user |
|
|
Code of the user time zone |