Accessing and Updating System Settings via Settings.xml

in SDK
The following example will demonstrate how to access and update the DefaultAccountEmailAddress setting via code.
1 In a new C# project in any desired IDE, add a reference to DecisionsFramework.dll and add using DecisionsFramework.ServiceLayer;
2 To access the DefaultAcocuntEmailAddress setting, add Settings.GetSettings().DefaultAccountEmailAddress. Add the following lines to update and save the changes to the setting.
C#
Settings.GetSettings().DefaultAccountEmailAddress = "Updated@decisions.com"; Settings.SaveSettings();
Below is a complete code example on how to access and update/save various settings from in the settings file in a console application.
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DecisionsFramework.ServiceLayer; namespace DecisionsSampleAccessingSystemSettingsXML { class AccessingSettingsXMLExample { static void Main(string[] args) { Console.WriteLine("LogFileMaxSize: " + Settings.GetSettings().LogFileMaxSize); Console.WriteLine("Bypass SMTP Server: " + Settings.GetSettings().Mail.ByPassSmtpServer); Console.WriteLine("Default Account Email Address: " + Settings.GetSettings().DefaultAccountEmailAddress); Console.WriteLine("Changing default account email address..."); Settings.GetSettings().DefaultAccountEmailAddress = "Updated@decisions.com"; Settings.SaveSettings(); Console.WriteLine("Default Account Email Address: " + Settings.GetSettings().DefaultAccountEmailAddress); Console.ReadLine(); } } }
The output of the above code will be the following:
C#
LogFileMaxSize: 10485760 Bypass SMTP Server: True Default Account Email Address: admin@decisions.com Changing default account email address... Default Account Email Address: Updated@decisions.com
from: https://documentation.decisions.com/v9/docs/accessing-system-settings-settings-xml
Howdy, Stranger!
Categories
- 4.3K All Categories
- 70 General
- 11 Training
- 206 Installation / Setup
- 1.1K Flows
- 109 Rules
- 268 Administration
- 212 Portal
- 496 General Q & A
- 706 Forms
- 338 Reports
- 3 Designer Extensions
- 48 Example Flows
- 56 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 184 Pages
- 5 Process Mining
- New Features
- 182 Datastructures
- 69 Repository
- 228 Integrations
- 28 Multi-Tenant
- 27 SDK
- 81 Modules
- 57 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 130 Lunch And Learn Questions