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

# NSPhoneListPreferences

> Search preferences for a phone list search.

Search preferences for a phone list search.

## Constructors

### NSPhoneListPreferences()

```crmscript theme={null}
NSPhoneListPreferences
```

Initializes a new instance of the NSPhoneListPreferences class.

## Methods

## GetSearchCompany()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if you want to search for Companies by their name.

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchCompany = thing.GetSearchCompany();
```

## GetSearchDepartment()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if you want to search for Departments where your colleagues work.

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchDepartment = thing.GetSearchDepartment();
```

## GetSearchFirstname()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if you want to search for Persons by their firstname.

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchFirstname = thing.GetSearchFirstname();
```

## GetSearchLastname()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if you want to search for Persons by their last name.

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchLastname = thing.GetSearchLastname();
```

## GetSearchModeCompany()

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

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode = thing.GetSearchModeCompany();
```

## GetSearchModeDepartment()

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

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode = thing.GetSearchModeDepartment();
```

## GetSearchModeFirstname()

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

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode = thing.GetSearchModeFirstname();
```

## GetSearchModeLastname()

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

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode = thing.GetSearchModeLastname();
```

## SetSearchCompany(Bool)

```crmscript theme={null}
Void SetSearchCompany(Bool searchCompany)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchCompany;
thing.SetSearchCompany(searchCompany);
```

## SetSearchDepartment(Bool)

```crmscript theme={null}
Void SetSearchDepartment(Bool searchDepartment)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchDepartment;
thing.SetSearchDepartment(searchDepartment);
```

## SetSearchFirstname(Bool)

```crmscript theme={null}
Void SetSearchFirstname(Bool searchFirstname)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchFirstname;
thing.SetSearchFirstname(searchFirstname);
```

## SetSearchLastname(Bool)

```crmscript theme={null}
Void SetSearchLastname(Bool searchLastname)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Bool searchLastname;
thing.SetSearchLastname(searchLastname);
```

## SetSearchModeCompany(Integer)

```crmscript theme={null}
Void SetSearchModeCompany(Integer searchMode)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode;
thing.SetSearchModeCompany(searchMode);
```

## SetSearchModeDepartment(Integer)

```crmscript theme={null}
Void SetSearchModeDepartment(Integer searchMode)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode;
thing.SetSearchModeDepartment(searchMode);
```

## SetSearchModeFirstname(Integer)

```crmscript theme={null}
Void SetSearchModeFirstname(Integer searchMode)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode;
thing.SetSearchModeFirstname(searchMode);
```

## SetSearchModeLastname(Integer)

```crmscript theme={null}
Void SetSearchModeLastname(Integer searchMode)
```

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

**Example:**

```crmscript theme={null}
NSPhoneListPreferences thing;
Integer searchMode;
thing.SetSearchModeLastname(searchMode);
```


## Related topics

- [NSPhoneListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPhoneListAgent.md)
- [SuperOffice.WebApi.Data.PhoneListPreferences](/en/api/reference/webapi/SuperOffice.WebApi.Data.PhoneListPreferences.md)
- [SuperOffice.WebApi.Data.PhoneList GetPreferencesRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.PhoneList_GetPreferencesRequest.md)
- [SuperOffice.WebApi.Data.PhoneList SearchWithPreferencesRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.PhoneList_SearchWithPreferencesRequest.md)
- [SuperOffice.WebApi.Data.PhoneList SetPreferencesRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.PhoneList_SetPreferencesRequest.md)
- [SuperOffice.WebApi.Agents.PhoneListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.PhoneListAgent.md)
