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.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions