Accessing System Settings (user settings)
  • Updated on 11 Dec 2013
  • 1 minute to read
  • Print
  • Dark
    Light

Accessing System Settings (user settings)

  • Print
  • Dark
    Light

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.

2018-06-29_145105.jpg

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 .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:

 portalSettings.SloganText = "Our Company Slogan";
ModuleSettingsAccessor<portalsettings>.SaveSettings();</portalsettings>

List Of Platform Settings Objects

 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
Was this article helpful?