Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleNote

Feature available only starting with the SWAT 21.14 Release


In Akioma.Crm.MasterData.System.ApplicationSettingsBT, a new method was added: GetApplicationSettingsByDomain. This method can be used for retrieving the backend properties based on an input domain/key. We only allow returning properties based on a domain for security reasons. so we don't expose all the application settings by default. Also, as it is right now, there is no way to access the application settings in the root of the file.

...

New method can be called using akioma.invokeServerTask, like in the example below, by specifying the desired settings domain in the request:

Code Block
languagejs
akioma.invokeServerTask({

...


      name: "Akioma.Crm.MasterData.System.ApplicationSettingsBT",

...


      methodName: "GetApplicationSettingsByDomain",

...


      paramObj: { plcParameter: {ApplicationSettingsDomain: "ckEditor"}

...

 }
    }).then((response)

...

 =

...

> {
     console.log(response);
});

The above call will return all the settings under the "ckEditor" domain.

...

The response would look like this:

...

Code Block
languagejs
{
?? ?? "SerializedType": "Akioma.Crm.MasterData.System.ApplicationSettingsParameter",

...


?? ?? "ApplicationSettingsDomain": "ckEditor",

...


?? ?? "ApplicationSettings":

...

 {
?? ?? ?? ?? "ckEditor":

...

 {
?? ?? ?? ?? ?? ?? "fontSize_defaultLabel": "10",

...


?? ?? ?? ?? ?? ?? "font_defaultLabel": "Arial",

...


?? ?? ?? ?? ?? ?? "listStyle_afterTextSpace": "-.25",

...


?? ?? ?? ?? ?? ?? "fontSize_sizes": "val",

...


?? ?? ?? ?? ?? ?? "styles": "",

...


?? ?? ?? ?? ?? ?? "specialChars": "",

...


?? ?? ?? ?? ?? ?? "listStyle_beforeTextSpace": ".25",

...


?? ?? ?? ?? ?? ?? "font_names": "Arial;Comic Sans MS;Courier New;Georgia;Lucida Sans Unicode;Tahoma;Times New Roman;Trebuchet MS;Verdana",

...


?? ?? ?? ?? ?? ?? "uiColor": "#DDDDDD",

...


?? ?? ?? ?? ?? ?? "toolbar": "Standard",

...


?? ?? ?? ?? ?? ?? "listStyle_defaultName": "MsoListParagraph",

...


?? ?? ?? ?? ?? ?? "editorAdvancedSettings": "{}",

...


?? ?? ?? ?? ?? ?? "templates": ""

...


?? ?? ?? ?? }
?? ?? }
}

All of the returned properties are available under: response.ApplicationSettings.ApplicationSettingsDomain (in our case, ApplicationSettings is ckEditor).

...

Here, nothing needs to be changed. The ApplicationSettingsKey ApplicationSettingsDomain property will be filled automatically from the backend.

...

For example, if our .restapplicationsettings file looks like below and we specify in the request the "rootProp1" as the ApplicationSettingsDomain, nothing will be returned.

...

Code Block
languagejs
{
?? ?? "rootProp1": "rootValue1",

...


?? ?? "rootProp2": "rootValue2",

...


?? ?? "rootProp3":

...

 {
?? ?? ?? ?? "subProp1": "subValue1"

...


?? ?? }
}