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

# NSSelectionEntity

## Constructors

### NSSelectionEntity()

```crmscript theme={null}
NSSelectionEntity
```

Initializes a new instance of the NSSelectionEntity class.

## Methods

## GetAssociate()

```crmscript theme={null}
NSAssociate GetAssociate()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - Owner of the selection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate associate = thing.GetAssociate();
```

## GetChartKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - ID/key of the last-used chart tile on this selection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String chartKey = thing.GetChartKey();
```

## GetCompanyUnique()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Filter out duplicate members based on company?

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Bool companyUnique = thing.GetCompanyUnique();
```

## GetCompleted()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - The Completed state.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Bool completed = thing.GetCompleted();
```

## GetCreatedBy()

```crmscript theme={null}
NSAssociate GetCreatedBy()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - Who created the selection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate createdBy = thing.GetCreatedBy();
```

## GetCreatedDate()

```crmscript theme={null}
DateTime GetCreatedDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Registered when.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime createdDate = thing.GetCreatedDate();
```

## GetDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.

**Example:**

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

## GetGroupIdx()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Original primary user group of associate.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer groupIdx = thing.GetGroupIdx();
```

## GetIncludePerson()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - 0 = Include first person, 1 = Include all persons, 2 = Include no persons.

**Example:**

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

## GetLastLoaded()

```crmscript theme={null}
DateTime GetLastLoaded()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date/time this selection was last loaded (selectionentity fetched).

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime lastLoaded = thing.GetLastLoaded();
```

## GetLastLoadedBy()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Who last loaded this selection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer lastLoadedBy = thing.GetLastLoadedBy();
```

## GetLastLoadedByAssociate()

```crmscript theme={null}
NSAssociate GetLastLoadedByAssociate()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - NSAssociate that last looked at the selection members; only date (not time) is valid.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate lastLoadedByAssociate = thing.GetLastLoadedByAssociate();
```

## GetLastMembershipChange()

```crmscript theme={null}
DateTime GetLastMembershipChange()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date/time the membership the selection last changed. Dynamic - change of criteria; Static - add/remove members; Combined - change of algorithm.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime lastMembershipChange = thing.GetLastMembershipChange();
```

## GetLastMembershipChangeBy()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Who last changed the membership.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer lastMembershipChangeBy = thing.GetLastMembershipChangeBy();
```

## GetLastMembershipChangeByAssociate()

```crmscript theme={null}
NSAssociate GetLastMembershipChangeByAssociate()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - Associate that last changed the selection membership (static members, dynamic criteria, combined parameters); only date (not time) is valid.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate lastMembershipChangeByAssociate = thing.GetLastMembershipChangeByAssociate();
```

## GetLeftSelectionId()

LeftSelectionId is used in combination with RightSelectionId and CombinationType to define an union of two selections when SelectionType=Combined.

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

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer leftSelectionId = thing.GetLeftSelectionId();
```

## GetMailingsProviderName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the provider for the Mailings tab, if relevant; this string will contain resource references.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mailingsProviderName = thing.GetMailingsProviderName();
```

## GetMainHeading()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - 'Static selection of Companies', or whatever else is appropriate, made by combining text resources for the type and the entity (plural form); this string will contain resource references

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mainHeading = thing.GetMainHeading();
```

## GetMainProviderName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the Archive Provider that will deliver the content of the archive\* the actual entity rows.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mainProviderName = thing.GetMainProviderName();
```

## GetMemberCount()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - How many selection members (for progress bar calculations)\* estimate, -1 (or 4294967295) means we don't know.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer memberCount = thing.GetMemberCount();
```

## GetMemberTabHeading()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - 'Companies', or whatever else is appropriate\* the plural form of the entity name; this string will contain resource references

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String memberTabHeading = thing.GetMemberTabHeading();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of selection, free-text indexed.

**Example:**

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

## GetPostit()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String postit = thing.GetPostit();
```

## GetPostitTextId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Postit text record ID.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer postitTextId = thing.GetPostitTextId();
```

## GetRightSelectionId()

RightSelectionId  is used in combination with LeftSelectionId and CombinationType to define an union of two selections when SelectionType=Combined.

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

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer rightSelectionId = thing.GetRightSelectionId();
```

## GetSelectionCategory()

```crmscript theme={null}
NSSelectionCategory GetSelectionCategory()
```

**Returns:** [CRMScript.NetServer.NSSelectionCategory](CRMScript.NetServer.NSSelectionCategory)

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSSelectionCategory selectionCategory = thing.GetSelectionCategory();
```

## GetSelectionId()

Primary key

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Selection category type (list item).

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionId = thing.GetSelectionId();
```

## GetSelectionType()

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

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionType = thing.GetSelectionType();
```

## GetSelectionUnionType()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - How to combine the two selections when SelectionType = Combined. See \<xref href="CRMScript.NetServer.SelectionUnionType" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionUnionType = thing.GetSelectionUnionType();
```

## GetShadowProviderName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name, if relevant, of the Archive Provider that will deliver the Shadow rows. contact/person rows related to the actual entity. Can be blank, indicating that there is no shadow archive.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String shadowProviderName = thing.GetShadowProviderName();
```

## GetSoundEx()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - What the name sounds like, for duplicate detection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String soundEx = thing.GetSoundEx();
```

## GetSource()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - How did we get this selection? For future integration needs.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer source = thing.GetSource();
```

## GetTargetTableName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - TargetTableName contains the name of the table in lowercase. defines the type of selection members this selection contains. e.g. 'contact', or 'project' or 'sale'

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String targetTableName = thing.GetTargetTableName();
```

## GetTargetTableNumber()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - TargetTableNumber defines the type of selection members this selection contains. e.g. the table number for 'contact', or 'project' or 'sale'

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer targetTableNumber = thing.GetTargetTableNumber();
```

## GetTextId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Description text record Id.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer textId = thing.GetTextId();
```

## GetUpdatedBy()

```crmscript theme={null}
NSAssociate GetUpdatedBy()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - Who last modified the selection.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate updatedBy = thing.GetUpdatedBy();
```

## GetUpdatedCount()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Number of updates made to this record.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer updatedCount = thing.GetUpdatedCount();
```

## GetUpdatedDate()

```crmscript theme={null}
DateTime GetUpdatedDate()
```

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Last updated when.

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime updatedDate = thing.GetUpdatedDate();
```

## GetVisibility()

Obsolete, but still maintained de-normalization of visiblefor

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

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer visibility = thing.GetVisibility();
```

## GetVisibleFor()

Returns the user groups and/or users the SelectionEntity item is visible for.

```crmscript theme={null}
NSVisibleFor[] GetVisibleFor()
```

**Returns:** [CRMScript.NetServer.NSVisibleFor](CRMScript.NetServer.NSVisibleFor)\[]

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
```

## SetAssociate(NSAssociate)

```crmscript theme={null}
Void SetAssociate(NSAssociate associate)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate associate;
thing.SetAssociate(associate);
```

## SetChartKey(String)

```crmscript theme={null}
Void SetChartKey(String chartKey)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String chartKey;
thing.SetChartKey(chartKey);
```

## SetCompanyUnique(Bool)

```crmscript theme={null}
Void SetCompanyUnique(Bool companyUnique)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Bool companyUnique;
thing.SetCompanyUnique(companyUnique);
```

## SetCompleted(Bool)

```crmscript theme={null}
Void SetCompleted(Bool completed)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Bool completed;
thing.SetCompleted(completed);
```

## SetCreatedBy(NSAssociate)

```crmscript theme={null}
Void SetCreatedBy(NSAssociate createdBy)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate createdBy;
thing.SetCreatedBy(createdBy);
```

## SetCreatedDate(DateTime)

```crmscript theme={null}
Void SetCreatedDate(DateTime createdDate)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime createdDate;
thing.SetCreatedDate(createdDate);
```

## SetDescription(String)

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

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

**Example:**

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

## SetGroupIdx(Integer)

```crmscript theme={null}
Void SetGroupIdx(Integer groupIdx)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer groupIdx;
thing.SetGroupIdx(groupIdx);
```

## SetIncludePerson(Integer)

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

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

**Example:**

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

## SetLastLoaded(DateTime)

```crmscript theme={null}
Void SetLastLoaded(DateTime lastLoaded)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime lastLoaded;
thing.SetLastLoaded(lastLoaded);
```

## SetLastLoadedBy(Integer)

```crmscript theme={null}
Void SetLastLoadedBy(Integer lastLoadedBy)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer lastLoadedBy;
thing.SetLastLoadedBy(lastLoadedBy);
```

## SetLastLoadedByAssociate(NSAssociate)

```crmscript theme={null}
Void SetLastLoadedByAssociate(NSAssociate lastLoadedByAssociate)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate lastLoadedByAssociate;
thing.SetLastLoadedByAssociate(lastLoadedByAssociate);
```

## SetLastMembershipChange(DateTime)

```crmscript theme={null}
Void SetLastMembershipChange(DateTime lastMembershipChange)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime lastMembershipChange;
thing.SetLastMembershipChange(lastMembershipChange);
```

## SetLastMembershipChangeBy(Integer)

```crmscript theme={null}
Void SetLastMembershipChangeBy(Integer lastMembershipChangeBy)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer lastMembershipChangeBy;
thing.SetLastMembershipChangeBy(lastMembershipChangeBy);
```

## SetLastMembershipChangeByAssociate(NSAssociate)

```crmscript theme={null}
Void SetLastMembershipChangeByAssociate(NSAssociate lastMembershipChangeByAssociate)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate lastMembershipChangeByAssociate;
thing.SetLastMembershipChangeByAssociate(lastMembershipChangeByAssociate);
```

## SetLeftSelectionId(Integer)

LeftSelectionId is used in combination with RightSelectionId and CombinationType to define an union of two selections when SelectionType=Combined.

```crmscript theme={null}
Void SetLeftSelectionId(Integer leftSelectionId)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer leftSelectionId;
thing.SetLeftSelectionId(leftSelectionId);
```

## SetMailingsProviderName(String)

```crmscript theme={null}
Void SetMailingsProviderName(String mailingsProviderName)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mailingsProviderName;
thing.SetMailingsProviderName(mailingsProviderName);
```

## SetMainHeading(String)

```crmscript theme={null}
Void SetMainHeading(String mainHeading)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mainHeading;
thing.SetMainHeading(mainHeading);
```

## SetMainProviderName(String)

```crmscript theme={null}
Void SetMainProviderName(String mainProviderName)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String mainProviderName;
thing.SetMainProviderName(mainProviderName);
```

## SetMemberCount(Integer)

```crmscript theme={null}
Void SetMemberCount(Integer memberCount)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer memberCount;
thing.SetMemberCount(memberCount);
```

## SetMemberTabHeading(String)

```crmscript theme={null}
Void SetMemberTabHeading(String memberTabHeading)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String memberTabHeading;
thing.SetMemberTabHeading(memberTabHeading);
```

## SetName(String)

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

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

**Example:**

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

## SetPostit(String)

```crmscript theme={null}
Void SetPostit(String postit)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String postit;
thing.SetPostit(postit);
```

## SetPostitTextId(Integer)

```crmscript theme={null}
Void SetPostitTextId(Integer postitTextId)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer postitTextId;
thing.SetPostitTextId(postitTextId);
```

## SetRightSelectionId(Integer)

RightSelectionId  is used in combination with LeftSelectionId and CombinationType to define an union of two selections when SelectionType=Combined.

```crmscript theme={null}
Void SetRightSelectionId(Integer rightSelectionId)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer rightSelectionId;
thing.SetRightSelectionId(rightSelectionId);
```

## SetSelectionCategory(NSSelectionCategory)

```crmscript theme={null}
Void SetSelectionCategory(NSSelectionCategory selectionCategory)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSSelectionCategory selectionCategory;
thing.SetSelectionCategory(selectionCategory);
```

## SetSelectionId(Integer)

```crmscript theme={null}
Void SetSelectionId(Integer selectionId)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionId;
thing.SetSelectionId(selectionId);
```

## SetSelectionType(Integer)

```crmscript theme={null}
Void SetSelectionType(Integer selectionType)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionType;
thing.SetSelectionType(selectionType);
```

## SetSelectionUnionType(Integer)

```crmscript theme={null}
Void SetSelectionUnionType(Integer selectionUnionType)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer selectionUnionType;
thing.SetSelectionUnionType(selectionUnionType);
```

## SetShadowProviderName(String)

```crmscript theme={null}
Void SetShadowProviderName(String shadowProviderName)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String shadowProviderName;
thing.SetShadowProviderName(shadowProviderName);
```

## SetSoundEx(String)

```crmscript theme={null}
Void SetSoundEx(String soundEx)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String soundEx;
thing.SetSoundEx(soundEx);
```

## SetSource(Integer)

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

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer source;
thing.SetSource(source);
```

## SetTargetTableName(String)

```crmscript theme={null}
Void SetTargetTableName(String targetTableName)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
String targetTableName;
thing.SetTargetTableName(targetTableName);
```

## SetTargetTableNumber(Integer)

```crmscript theme={null}
Void SetTargetTableNumber(Integer targetTableNumber)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer targetTableNumber;
thing.SetTargetTableNumber(targetTableNumber);
```

## SetTextId(Integer)

```crmscript theme={null}
Void SetTextId(Integer textId)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer textId;
thing.SetTextId(textId);
```

## SetUpdatedBy(NSAssociate)

```crmscript theme={null}
Void SetUpdatedBy(NSAssociate updatedBy)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSAssociate updatedBy;
thing.SetUpdatedBy(updatedBy);
```

## SetUpdatedCount(Integer)

```crmscript theme={null}
Void SetUpdatedCount(Integer updatedCount)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer updatedCount;
thing.SetUpdatedCount(updatedCount);
```

## SetUpdatedDate(DateTime)

```crmscript theme={null}
Void SetUpdatedDate(DateTime updatedDate)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);
```

## SetVisibility(Integer)

Obsolete, but still maintained de-normalization of visiblefor

```crmscript theme={null}
Void SetVisibility(Integer visibility)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
Integer visibility;
thing.SetVisibility(visibility);
```

## SetVisibleFor(NSVisibleFor\[])

Sets the user-groups and/or users the SelectionEntity item is visible for.

```crmscript theme={null}
Void SetVisibleFor(NSVisibleFor[] visibleFor)
```

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

**Example:**

```crmscript theme={null}
NSSelectionEntity thing;
NSVisibleFor[] visibleFor = thing.GetVisibleFor();
visibleFor[0].SetVisiblity(1);  // usergroup
visibleFor[0].SetVisibleId(123); // usergroup id
thing.SetVisibleFor(visibleFor);
```


## Related topics

- [NSSelectionAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSSelectionAgent.md)
- [Delete Selection Entity](/en/api/reference/restful/agent/selection_agent/delete-selection-entity.md)
- [Get Selection Entity](/en/api/reference/restful/rest/selection/get-selection-entity.md)
- [Post Selection Entity](/en/api/reference/restful/rest/selection/post-selection-entity.md)
- [Save Selection Entity](/en/api/reference/restful/agent/selection_agent/save-selection-entity.md)
