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

# NSTypicalSearches

## Constructors

### NSTypicalSearches()

```crmscript theme={null}
NSTypicalSearches
```

Initializes a new instance of the NSTypicalSearches class.

## Methods

## GetDeleteLeftovers()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - If true, then any TypicalSearch records in the database that are NOT referenced in this call, should be deleted.

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
Bool deleteLeftovers = thing.GetDeleteLeftovers();
```

## GetMasterVersion()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The master version number in this update, at least the highest of those in the searches, but can be higher to force an update (and delete of missing elements).

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
Integer masterVersion = thing.GetMasterVersion();
```

## GetSearches()

```crmscript theme={null}
NSTypicalSearch[] GetSearches()
```

**Returns:** [CRMScript.NetServer.NSTypicalSearch](CRMScript.NetServer.NSTypicalSearch)\[] - The TypicalSearch structures (including criteria) to import.

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
NSTypicalSearch[] searches = thing.GetSearches();
```

## GetSource()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of organization that sources and maintains this TypicalSearch.

<Note>
  Allows for both SuperOffice and partners to maintain sets of typical searches without conflict
</Note>

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
String source = thing.GetSource();
```

## SetDeleteLeftovers(Bool)

```crmscript theme={null}
Void SetDeleteLeftovers(Bool deleteLeftovers)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
Bool deleteLeftovers;
thing.SetDeleteLeftovers(deleteLeftovers);
```

## SetMasterVersion(Integer)

```crmscript theme={null}
Void SetMasterVersion(Integer masterVersion)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
Integer masterVersion;
thing.SetMasterVersion(masterVersion);
```

## SetSearches(NSTypicalSearch\[])

```crmscript theme={null}
Void SetSearches(NSTypicalSearch[] searches)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
NSTypicalSearch[] searches;
thing.SetSearches(searches);
```

## SetSource(String)

```crmscript theme={null}
Void SetSource(String source)
```

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

<Note>
  Allows for both SuperOffice and partners to maintain sets of typical searches without conflict
</Note>

**Example:**

```crmscript theme={null}
NSTypicalSearches thing;
String source;
thing.SetSource(source);
```


## Related topics

- [NSTypicalSearch](/en/automation/crmscript/reference/CRMScript.NetServer.NSTypicalSearch.md)
- [NSSelectionAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSSelectionAgent.md)
- [Typical search](/en/api/search/find-selection/typical-search.md)
- [Update Typical Search](/en/api/reference/restful/agent/selection_agent/update-typical-search.md)
- [Export and import of typical search](/en/api/search/find-selection/import-export-typical-search.md)
- [TypicalSearch table](/en/database/tables/typicalsearch.md)
