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

# NSFieldInfoRelation

> Relation to other table database field.

Relation to other table database field.

## Constructors

### NSFieldInfoRelation()

```crmscript theme={null}
NSFieldInfoRelation
```

Initializes a new instance of the NSFieldInfoRelation class.

## Methods

## GetDefaultValue()

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

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
Integer defaultValue = thing.GetDefaultValue();
```

## GetMdoListName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - MDO list name used to populate this list. (Read-only, derived from TargetTable).

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String mdoListName = thing.GetMdoListName();
```

## GetTargetLabel()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Display name on target entity.

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String targetLabel = thing.GetTargetLabel();
```

## GetTargetTable()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of target table 'contact', 'y\_equipment'

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String targetTable = thing.GetTargetTable();
```

## GetUseDropDown()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Show as dropdown list on target?

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
Bool useDropDown = thing.GetUseDropDown();
```

## SetDefaultValue(Integer)

```crmscript theme={null}
Void SetDefaultValue(Integer defaultValue)
```

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
Integer defaultValue;
thing.SetDefaultValue(defaultValue);
```

## SetMdoListName(String)

```crmscript theme={null}
Void SetMdoListName(String mdoListName)
```

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String mdoListName;
thing.SetMdoListName(mdoListName);
```

## SetTargetLabel(String)

```crmscript theme={null}
Void SetTargetLabel(String targetLabel)
```

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String targetLabel;
thing.SetTargetLabel(targetLabel);
```

## SetTargetTable(String)

```crmscript theme={null}
Void SetTargetTable(String targetTable)
```

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
String targetTable;
thing.SetTargetTable(targetTable);
```

## SetUseDropDown(Bool)

```crmscript theme={null}
Void SetUseDropDown(Bool useDropDown)
```

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

**Example:**

```crmscript theme={null}
NSFieldInfoRelation thing;
Bool useDropDown;
thing.SetUseDropDown(useDropDown);
```


## Related topics

- [SuperOffice.WebApi.Data.FieldInfoRelation](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoRelation.md)
- [ExtraFieldsInfo](/en/automation/crmscript/reference/CRMScript.Native.ExtraFieldsInfo.md)
- [Relation](/en/api/archive-providers/reference/relation.md)
- [Relation events](/en/automation/webhook/reference/relation-events.md)
- [SuperOffice.WebApi.Data.FieldInfoBase](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldInfoBase.md)
- [Relations](/en/api/reference/restful/rest/person/relations.md)
