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

# NSPreferenceSpec

> Preference specification, consisting of the section name and key name.

Preference specification, consisting of the section name and key name.

## Constructors

### NSPreferenceSpec()

```crmscript theme={null}
NSPreferenceSpec
```

Initializes a new instance of the NSPreferenceSpec class.

## Methods

## GetKey()

```crmscript theme={null}
String GetKey()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Preference key name.

**Example:**

```crmscript theme={null}
NSPreferenceSpec thing;
String key = thing.GetKey();
```

## GetSection()

```crmscript theme={null}
String GetSection()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Preference section name.

**Example:**

```crmscript theme={null}
NSPreferenceSpec thing;
String section = thing.GetSection();
```

## SetKey(String)

```crmscript theme={null}
Void SetKey(String key)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSPreferenceSpec thing;
String key;
thing.SetKey(key);
```

## SetSection(String)

```crmscript theme={null}
Void SetSection(String section)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSPreferenceSpec thing;
String section;
thing.SetSection(section);
```


## Related topics

- [NSPreference](/en/automation/crmscript/reference/CRMScript.NetServer.NSPreference.md)
- [NSPreferenceAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPreferenceAgent.md)
- [SuperOffice.WebApi.Data.PreferenceSpec](/en/api/reference/webapi/SuperOffice.WebApi.Data.PreferenceSpec.md)
- [SuperOffice.WebApi.Agents.PreferenceAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.PreferenceAgent.md)
- [SuperOffice.WebApi.Agents.IPreferenceAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IPreferenceAgent.md)
- [Set preference](/en/api/web-services/howto/user-preferences/set-preferences-preferenceagent.md)
