Page tree

Versions Compared

Key

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

...

In Akioma.Crm.MasterData.System.ApplicationSettingsBT, a new method was added: GetApplicationSettingsByKeyGetApplicationSettingsByDomain. This method can be used for retrieving the backend properties based on an input domain/key. We only allow returning properties based on a key 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.

...

In the ApplicationSettingsParameter, a new property was added: ApplicationSettingsKey ApplicationSettingsDomain. This MUST BE SPECIFIED WHEN CALLING GetApplicationSettingsByKeyCALLING GetApplicationSettingsByDomainIf no ApplicationSettingsKey no ApplicationSettingsDomain is specified when calling the new method, nothing will be returned.

...

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

akioma.invokeServerTask({
      name: "Akioma.Crm.MasterData.System.ApplicationSettingsBT",
      methodName: "

...

GetApplicationSettingsByDomain",
      paramObj: { plcParameter: {

...

ApplicationSettingsDomain: "ckEditor"} }
    }).then((response) => {
     //process response
    } catch (e) {

     //process error
   }
});

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


The response would look like this:

{
    "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.ApplicationSettingsKey ApplicationSettingsDomain (in our case, ApplicationSettings is ckEditor).

...

NOTE: The existing GetTranslationSettings method was also refactored to make use of the GetApplicationSettingsByKey GetApplicationSettingsByDomain method.

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


Note: Specifying a root property/domain name will not return anything.

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

{
    "rootProp1": "rootValue1",
    "rootProp2": "rootValue2",
    "rootProp3": {
        "subProp1": "subValue1"
    }
}