Interacting with the ACS db - Settings

Scripts can interact with the Device Manager ACS database by referencing the: Device, Subscriber and Settings objects.
There is but a single definition related to the Settings object.

CA.Core.getSettings()

function CA.Core.getSettings();
Description Read this subscriber’s settings from the ACS dB
Parameters None
Returns Returns the subscriber’s settings structure, otherwise an exception is thrown. See the Subscriber Settings DTO Schema section below for details.
Required Libraries useLibrary('settings');
Example

useLibrary(‘settings’);

useLibrary(‘sync’);

 

// Read this subscriber's settings from the ACS dB

var settings = CA.Core.getSettings();

// Write PPP settings for this sub if they exist in the dB

if (settings.WANPPPConnections)

{

log.info("Setting PPP username: " + settings.WANPPPConnections[1].Username);

sync.syncApps(["PPP"], []);

}