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

# NSRelationDefinitionEntity

> A relation definition entity with source and destination tables.

A relation definition entity with source and destination tables.

## Constructors

### NSRelationDefinitionEntity()

```crmscript theme={null}
NSRelationDefinitionEntity
```

Initializes a new instance of the NSRelationDefinitionEntity class.

## Methods

## GetDeleted()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if deleted.

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Bool deleted = thing.GetDeleted();
```

## GetDestination()

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

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer destination = thing.GetDestination();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Active text.

**Example:**

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

## GetPassiveText()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Text used in passive direction.

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
String passiveText = thing.GetPassiveText();
```

## GetRank()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Rank order.

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer rank = thing.GetRank();
```

## GetReldefId()

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

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer reldefId = thing.GetReldefId();
```

## GetSource()

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

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

**Example:**

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

## GetTooltip()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Tooltip or other description.

**Example:**

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

## SetDeleted(Bool)

```crmscript theme={null}
Void SetDeleted(Bool deleted)
```

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Bool deleted;
thing.SetDeleted(deleted);
```

## SetDestination(Integer)

```crmscript theme={null}
Void SetDestination(Integer destination)
```

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer destination;
thing.SetDestination(destination);
```

## SetName(String)

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

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

**Example:**

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

## SetPassiveText(String)

```crmscript theme={null}
Void SetPassiveText(String passiveText)
```

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
String passiveText;
thing.SetPassiveText(passiveText);
```

## SetRank(Integer)

```crmscript theme={null}
Void SetRank(Integer rank)
```

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer rank;
thing.SetRank(rank);
```

## SetReldefId(Integer)

```crmscript theme={null}
Void SetReldefId(Integer reldefId)
```

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

**Example:**

```crmscript theme={null}
NSRelationDefinitionEntity thing;
Integer reldefId;
thing.SetReldefId(reldefId);
```

## SetSource(Integer)

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

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

**Example:**

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

## SetTooltip(String)

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

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

**Example:**

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


## Related topics

- [NSListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSListAgent.md)
- [Get Relation Definition Entity](/en/api/reference/restful/rest/relationdefinition/get-relation-definition-entity.md)
- [Post Relation Definition Entity](/en/api/reference/restful/rest/relationdefinition/post-relation-definition-entity.md)
- [Default Relation Definition Entity](/en/api/reference/restful/rest/relationdefinition/default-relation-definition-entity.md)
- [Put Relation Definition Entity](/en/api/reference/restful/rest/relationdefinition/put-relation-definition-entity.md)
- [Save Relation Definition Entity](/en/api/reference/restful/agent/list_agent/save-relation-definition-entity.md)
