Namespace: AppSettings

sap. AppSettings

Used to access SMP application settings.
See:

Methods

(static) getApplicationEndpoint(successCallback, errorCallback)

Retrieves the application end-point with which the application can access business data.
Parameters:
Name Type Description
successCallback function Called with the value of the ProxyApplicationEndpoint.
errorCallback function Called with error object that contains status and statusText.
Example
sap.AppSettings.getApplicationEndpoint(function(endpoint) {
   console.log("Endpoint: " + endpoint);
}, function(error) {
   alert("Failed to get setting. Status code" + error.statusCode + " text: " + error.statusText);
});

(static) getConfigProperty(successCallback, errorCallback, name)

Retrieves a config property by name.
Parameters:
Name Type Description
successCallback function Called with the value of the property.
errorCallback function Called with error object that contains status and statusText.
name string The property name
Example
sap.AppSettings.getConfigProperty(function(token) {
   console.log("DeviceToken: " + token);
}, function(error) {
   alert("Failed to get setting. Status code" + error.statusCode + " text: " + error.statusText);
}, "ApnsDeviceToken");

(static) setConfigProperty(nameVals, successCallback, errorCallback)

Updates the provided Name-Vaule pairs of config properties.
Parameters:
Name Type Description
nameVals object Object that contains name value pairs.
successCallback function Called if set is successful.
errorCallback function Called with error object that contains status and statusText.
Example
sap.AppSettings.setConfigProperty({ "ApnsDeviceToken" : "mytoken" }, function() {
   console.log("Device token set");
}, function(error) {
   alert("Failed to set setting. Status code" + error.statusCode + " text: " + error.statusText);
});