---
title: "SDK: Creating Settings Objects"
slug: "creating-settings-objects"
description: "This document shows how to create a public class in Visual Studio, to create a custom Settings Object.  This is helpful if a user is creating an application that needs its own set of settings."
updated: 2024-11-13T18:32:10Z
published: 2024-11-13T18:32:10Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK: Creating Settings Objects

### Overview

If the application requires its own set of settings, new settings can be created via code. After creating these settings, the values of these settings can be fetched and set via code (see [Accessing System Settings (user settings)](https://documentation.decisions.com/docs/accessing-system-settings-user-settings)) or by users who navigate in the portal to **System > Settings** and edit your specific settings.

### Example of Creating Settings

Create a new class file project with a public class that inherits from and implementsAbstractModuleSettings. Add references to System.Runtime.Serialization and DecisionsFramework. Decorate the class with [ORMEntity] & [DataContract].

Below is an example implementation of AbstractModuleSettings.

```
 List<baseactiontype> actionTypes = new List<baseactiontype>();
actionTypes.Add(new EditEntityAction(typeof(MyCustomSettings), "Edit Settings", "Edit My Custom Settings"));
return actionTypes.ToArray();</baseactiontype></baseactiontype>
```

For each individual setting should be part of the new settings object, add a public and private member decorated as shown below.

```
 [ORMField]
private string externalUrl = "";

[DataMember]
public string ExternalUrl
{
    get { return externalUrl; }
    set { externalUrl = value; }
}
```

The custom settings object will not be initialized until it is accessed for the first time. To have it initialized immediately, the type should implement Initializable.

```
 public class DefaultAuditSettings : AbstractModuleSettings, IInitializable
....
public void Initialize()
{
   // Make sure Audit Settings gets initialized in life.
   ModuleSettingsAccessor<defaultauditsettings>.GetSettings();
}</defaultauditsettings>
```
