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

# NSRole

> Users role for role-based security.

Users role for role-based security.

## Constructors

### NSRole()

```crmscript theme={null}
NSRole
```

Initializes a new instance of the NSRole class.

## Methods

## GetId()

Gets the primary key (ID) for the Role

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

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

**Example:**

```crmscript theme={null}
NSRole thing;
Integer id = thing.GetId();
```

## GetTooltip()

Gets the tooltip description for the Role list item.

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

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

**Example:**

```crmscript theme={null}
NSRole thing;
String descr = thing.GetTooltip();
```

## GetValue()

Gets the name of the Role.

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

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

**Example:**

```crmscript theme={null}
NSRole thing;
String name = thing.GetValue();
```

## SetId(Integer)

Sets the primary key (ID) for the Role

```crmscript theme={null}
Void SetId(Integer id)
```

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

**Example:**

```crmscript theme={null}
NSRole thing;
thing.SetId(123);
```

## SetTooltip(String)

Sets the tooltip description for the Role list item.

```crmscript theme={null}
Void SetTooltip(String tooltip)
```

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

**Example:**

```crmscript theme={null}
NSRole thing;
String descr = "something new";
thing.SetTooltip(descr);
```

## SetValue(String)

Sets the name of the Role item.

```crmscript theme={null}
Void SetValue(String value)
```

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

**Example:**

```crmscript theme={null}
NSRole thing;
thing.SetValue("frotz");
```


## Related topics

- [NSUserAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSUserAgent.md)
- [NSUser](/en/automation/crmscript/reference/CRMScript.NetServer.NSUser.md)
- [NSRoleEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSRoleEntity.md)
- [roles](/en/api/mdo-providers/reference/roles.md)
- [Roles](/en/admin/user-management/role/index.md)
- [Role](/en/api/archive-providers/reference/role.md)
