Accessing System Settings (user settings)Last Updated: 06/29/2018 Introduced in Version: 2.0 |
What is a settings object
A settings object is a collection of values that a portal user can edit and which can be used by code. Many times these settings are used to store things like connection information and credentials to external system so that step which interact with those systems can fetch their connection settings from a central place. These settings are also used to customize various aspects of the Decisions Portal.
Where a settings object is edited/maintained
These settings can be set by Portal users by navigating to the /System/Settings/ portal folder. In this folder, users will see a list of all settings which they can edit.
Accessing Settings Via Code
Any of the settings found in the portal at System > Settings can be accessed via code using the
ModuleSettingsAccessor. For example, to access the Portal Settings you could use
PortalSettings portalSettings = ModuleSettingsAccessor<PortalSettings>.GetSettings();
Now each of the properties of Portal Settings can be accessed in your code. For example, to access the portal’s Slogan Text you would use
portalSettings.SloganText.
Editing Settings Via Code
After accessing settings using
ModuleSettingsAccessor, you can modify and save the values of each individual setting using
.SaveSettings() off
ModuleSettingsAccessor. Below is an example of how to set and save the Slogan Text:
1 2 |
portalSettings.SloganText = "Our Company Slogan"; ModuleSettingsAccessor<PortalSettings>.SaveSettings(); |
List Of Platform Settings Objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
DecisionsFramework.ServiceLayer.Services.Accounts.ActiveDirectory.ActiveDirectorySettings DecisionsFramework.ServiceLayer.Services.AmazonCloud.EC2.AmazonEC2PortalSettings DecisionsFramework.ServiceLayer.Services.Assignments.AssignmentSettings DecisionsFramework.ServiceLayer.Services.Statistics.ClientStatisticsSettings DecisionsFramework.ServiceLayer.Services.Portal.ClusteringSettings DecisionsFramework.ServiceLayer.Services.CMDB.CMDBSettings DecisionsFramework.ServiceLayer.Services.CMS.Content.CMSModuleSettings DecisionsFramework.ServiceLayer.Services.Comment.CommentModuleSettings DecisionsFramework.ServiceLayer.Services.Organization.ContactInfoSettings DecisionsFramework.ServiceLayer.CustomPermissionsSetting DecisionsFramework.ServiceLayer.Services.AuditService.DefaultAuditSettings DecisionsFramework.Design.DesignerSettings DecisionsFramework.ServiceLayer.Services.Document.DocumentModuleSettings DecisionsFramework.ServiceLayer.Services.Facebook.FacebookSettings Decisions.TaskTracking.Service.CMDB.Configuration_Items.HardwareRequestSettings DecisionsFramework.ServiceLayer.Services.Portal.HTMLPortalSettings DecisionsFramework.ServiceLayer.Services.ImportExport.ImportExportSettings Decisions.TaskTracking.Service.CMDB.Configuration_Items.MobileRequestSettings DecisionsFramework.ServiceLayer.Services.Portal.PortalSettings DecisionsFramework.ServiceLayer.Services.Tagging.TagSettings Decisions.Telephony.Service.TelephonySettings Decisions.TestManager.Service.TestManagerSettings |