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

# NSTypicalSearch

## Constructors

### NSTypicalSearch()

```crmscript theme={null}
NSTypicalSearch
```

Initializes a new instance of the NSTypicalSearch class.

## Methods

## GetEntityName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the entity the typical search links to.

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String entityName = thing.GetEntityName();
```

## GetIncludePerson()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - For selection-of-company, state of the Include Main Contact checkbox.

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer includePerson = thing.GetIncludePerson();
```

## GetIsEntityDefault()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Indicates if this is the default set of criteria for an entity.

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer isEntityDefault = thing.GetIsEntityDefault();
```

## GetRestrictionGroups()

```crmscript theme={null}
NSArchiveRestrictionGroup[] GetRestrictionGroups()
```

**Returns:** [CRMScript.NetServer.NSArchiveRestrictionGroup](CRMScript.NetServer.NSArchiveRestrictionGroup)\[] - The restrictions (can be multiple groups) that make up the TypicalSearch.

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
NSArchiveRestrictionGroup[] restrictionGroups = thing.GetRestrictionGroups();
```

## 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}
NSTypicalSearch thing;
String source = thing.GetSource();
```

## GetTitle()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The title of the typical search (multilingual).

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String title = thing.GetTitle();
```

## GetTooltip()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The tooltip for the typical search (multilingual).

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String tooltip = thing.GetTooltip();
```

## GetTypicalSearchId()

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

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer typicalSearchId = thing.GetTypicalSearchId();
```

## GetVersionNumber()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The current downloaded version of this typical search.

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer versionNumber = thing.GetVersionNumber();
```

## SetEntityName(String)

```crmscript theme={null}
Void SetEntityName(String entityName)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String entityName;
thing.SetEntityName(entityName);
```

## SetIncludePerson(Integer)

```crmscript theme={null}
Void SetIncludePerson(Integer includePerson)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer includePerson;
thing.SetIncludePerson(includePerson);
```

## SetIsEntityDefault(Integer)

```crmscript theme={null}
Void SetIsEntityDefault(Integer isEntityDefault)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer isEntityDefault;
thing.SetIsEntityDefault(isEntityDefault);
```

## SetRestrictionGroups(NSArchiveRestrictionGroup\[])

```crmscript theme={null}
Void SetRestrictionGroups(NSArchiveRestrictionGroup[] restrictionGroups)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
NSArchiveRestrictionGroup[] restrictionGroups;
thing.SetRestrictionGroups(restrictionGroups);
```

## 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}
NSTypicalSearch thing;
String source;
thing.SetSource(source);
```

## SetTitle(String)

```crmscript theme={null}
Void SetTitle(String title)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String title;
thing.SetTitle(title);
```

## SetTooltip(String)

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

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
String tooltip;
thing.SetTooltip(tooltip);
```

## SetTypicalSearchId(Integer)

```crmscript theme={null}
Void SetTypicalSearchId(Integer typicalSearchId)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer typicalSearchId;
thing.SetTypicalSearchId(typicalSearchId);
```

## SetVersionNumber(Integer)

```crmscript theme={null}
Void SetVersionNumber(Integer versionNumber)
```

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

**Example:**

```crmscript theme={null}
NSTypicalSearch thing;
Integer versionNumber;
thing.SetVersionNumber(versionNumber);
```


## Related topics

- [NSTypicalSearches](/en/automation/crmscript/reference/CRMScript.NetServer.NSTypicalSearches.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)
