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

# NSPreferenceDescription

> Preference description, drives the Preference GUI. Maintenance client - controls all preferences in SuperOffice.

Preference description, drives the Preference GUI. Maintenance client - controls all preferences in SuperOffice.

## Constructors

### NSPreferenceDescription()

```crmscript theme={null}
NSPreferenceDescription
```

Initializes a new instance of the NSPreferenceDescription class.

## Methods

## GetAccessFlags()

```crmscript theme={null}
Integer GetAccessFlags()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - See \<xref href="CRMScript.NetServer.PrefDescAccessFlags" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer accessFlags = thing.GetAccessFlags();
```

## GetDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Description of preference, multi-language parsed.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String description = thing.GetDescription();
```

## GetIsBuiltin()

```crmscript theme={null}
Bool GetIsBuiltin()
```

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - 1 = This row populated and maintained by SuperOffice.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Bool isBuiltin = thing.GetIsBuiltin();
```

## GetKey()

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

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

**Example:**

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

## GetMaxLevel()

```crmscript theme={null}
Integer GetMaxLevel()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Lowest allowed setting level, set by user, but not lower than enum \<xref href="CRMScript.NetServer.PreferenceLevel" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer maxLevel = thing.GetMaxLevel();
```

## GetMaxValue()

```crmscript theme={null}
Integer GetMaxValue()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Max value (if type 1); list table ID (if type 5).

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer maxValue = thing.GetMaxValue();
```

## GetMinLevel()

```crmscript theme={null}
Integer GetMinLevel()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The minimum (furthest away from User) level this preference can be set for.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer minLevel = thing.GetMinLevel();
```

## GetMinValue()

```crmscript theme={null}
Integer GetMinValue()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Min value (if type 1); list extra id (if type 5).

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer minValue = thing.GetMinValue();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Multi-language name.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String name = thing.GetName();
```

## GetPrefDescId()

```crmscript theme={null}
Integer GetPrefDescId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer prefDescId = thing.GetPrefDescId();
```

## GetRank()

```crmscript theme={null}
Integer GetRank()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Rank field for ordering sections, and keys within sections.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer rank = thing.GetRank();
```

## GetRequiredLicense()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Licenses the user/installation must have if this reference is to be shown. Comma-separated list of owner.module pairs.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String requiredLicense = thing.GetRequiredLicense();
```

## GetSection()

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

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

**Example:**

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

## GetSubGroup()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Keys that share a value (including NULL) in this field are shown together; a visual spacer is shown between groups.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String subGroup = thing.GetSubGroup();
```

## GetSysMaxLevel()

```crmscript theme={null}
Integer GetSysMaxLevel()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Lowest allowed setting level, set by SuperOffice. See \<xref href="CRMScript.NetServer.PreferenceLevel" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer sysMaxLevel = thing.GetSysMaxLevel();
```

## GetTableName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - If valueType = 5, then TableName contains the table referenced by the preference.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String tableName = thing.GetTableName();
```

## GetUserDefinedListId()

```crmscript theme={null}
Integer GetUserDefinedListId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Read-only field, If valueType = 5, and TableName is UDList, then UserdefinedLIstId contains the ID of the list referenced by the preference.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer userDefinedListId = thing.GetUserDefinedListId();
```

## GetValueType()

```crmscript theme={null}
Integer GetValueType()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - See \<xref href="CRMScript.NetServer.PrefDescValueType" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer valueType = thing.GetValueType();
```

## SetAccessFlags(Integer)

```crmscript theme={null}
Void SetAccessFlags(Integer accessFlags)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer accessFlags;
thing.SetAccessFlags(accessFlags);
```

## SetDescription(String)

```crmscript theme={null}
Void SetDescription(String description)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String description;
thing.SetDescription(description);
```

## SetIsBuiltin(Bool)

```crmscript theme={null}
Void SetIsBuiltin(Bool isBuiltin)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Bool isBuiltin;
thing.SetIsBuiltin(isBuiltin);
```

## SetKey(String)

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

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

**Example:**

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

## SetMaxLevel(Integer)

```crmscript theme={null}
Void SetMaxLevel(Integer maxLevel)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer maxLevel;
thing.SetMaxLevel(maxLevel);
```

## SetMaxValue(Integer)

```crmscript theme={null}
Void SetMaxValue(Integer maxValue)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer maxValue;
thing.SetMaxValue(maxValue);
```

## SetMinLevel(Integer)

```crmscript theme={null}
Void SetMinLevel(Integer minLevel)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer minLevel;
thing.SetMinLevel(minLevel);
```

## SetMinValue(Integer)

```crmscript theme={null}
Void SetMinValue(Integer minValue)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer minValue;
thing.SetMinValue(minValue);
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String name;
thing.SetName(name);
```

## SetPrefDescId(Integer)

```crmscript theme={null}
Void SetPrefDescId(Integer prefDescId)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer prefDescId;
thing.SetPrefDescId(prefDescId);
```

## SetRank(Integer)

```crmscript theme={null}
Void SetRank(Integer rank)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer rank;
thing.SetRank(rank);
```

## SetRequiredLicense(String)

```crmscript theme={null}
Void SetRequiredLicense(String requiredLicense)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String requiredLicense;
thing.SetRequiredLicense(requiredLicense);
```

## SetSection(String)

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

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

**Example:**

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

## SetSubGroup(String)

```crmscript theme={null}
Void SetSubGroup(String subGroup)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String subGroup;
thing.SetSubGroup(subGroup);
```

## SetSysMaxLevel(Integer)

```crmscript theme={null}
Void SetSysMaxLevel(Integer sysMaxLevel)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer sysMaxLevel;
thing.SetSysMaxLevel(sysMaxLevel);
```

## SetTableName(String)

```crmscript theme={null}
Void SetTableName(String tableName)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
String tableName;
thing.SetTableName(tableName);
```

## SetUserDefinedListId(Integer)

```crmscript theme={null}
Void SetUserDefinedListId(Integer userDefinedListId)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer userDefinedListId;
thing.SetUserDefinedListId(userDefinedListId);
```

## SetValueType(Integer)

```crmscript theme={null}
Void SetValueType(Integer valueType)
```

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

**Example:**

```crmscript theme={null}
NSPreferenceDescription thing;
Integer valueType;
thing.SetValueType(valueType);
```


## Related topics

- [NSPreferenceAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPreferenceAgent.md)
- [NSPreferenceDescriptionLine](/en/automation/crmscript/reference/CRMScript.NetServer.NSPreferenceDescriptionLine.md)
- [Delete Preference Description](/en/api/reference/restful/rest/preferencedescription/delete-preference-description.md)
- [Get Preference Description](/en/api/reference/restful/rest/preferencedescription/get-preference-description.md)
- [Post Preference Description](/en/api/reference/restful/rest/preferencedescription/post-preference-description.md)
