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

# NSKbCategory

## Constructors

### NSKbCategory()

```crmscript theme={null}
NSKbCategory
```

Initializes a new instance of the NSKbCategory class.

## Methods

## GetDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The description of this category.

**Example:**

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

## GetFullname()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The full name of this category, i.e. Foo/bar/test.

**Example:**

```crmscript theme={null}
NSKbCategory thing;
String fullname = thing.GetFullname();
```

## GetKbCategoryId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The primary key (auto-incremented).

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer kbCategoryId = thing.GetKbCategoryId();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of this category.

**Example:**

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

## GetParentId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - This entry contains a reference to the parent category. NULL or -1 if this is a top-level category.

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer parentId = thing.GetParentId();
```

## GetSortOrder()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - A strictly ascending number used for sorting categories when they are listed.

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer sortOrder = thing.GetSortOrder();
```

## SetDescription(String)

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

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

**Example:**

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

## SetFullname(String)

```crmscript theme={null}
Void SetFullname(String fullname)
```

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

**Example:**

```crmscript theme={null}
NSKbCategory thing;
String fullname;
thing.SetFullname(fullname);
```

## SetKbCategoryId(Integer)

```crmscript theme={null}
Void SetKbCategoryId(Integer kbCategoryId)
```

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

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer kbCategoryId;
thing.SetKbCategoryId(kbCategoryId);
```

## SetName(String)

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

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

**Example:**

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

## SetParentId(Integer)

```crmscript theme={null}
Void SetParentId(Integer parentId)
```

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

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer parentId;
thing.SetParentId(parentId);
```

## SetSortOrder(Integer)

```crmscript theme={null}
Void SetSortOrder(Integer sortOrder)
```

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

**Example:**

```crmscript theme={null}
NSKbCategory thing;
Integer sortOrder;
thing.SetSortOrder(sortOrder);
```


## Related topics

- [NSChatWidgetSettings](/en/automation/crmscript/reference/CRMScript.NetServer.NSChatWidgetSettings.md)
- [kb_category table](/en/database/tables/kb-category.md)
- [kb_category_log table](/en/database/tables/kb-category-log.md)
- [SuperOffice.WebApi.Data.KbCategory](/en/api/reference/webapi/SuperOffice.WebApi.Data.KbCategory.md)
- [kb_group table](/en/database/tables/kb-group.md)
- [kb_entry table](/en/database/tables/kb-entry.md)
