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

# NSFieldMetadata

> Used to populate the Admin configuration dialog for a connection. The call to the ERP Connector’s GetConfigurationFields method returns a list of fields and field types. The Admin client builds a dialog with these fields.

Used to populate the Admin configuration dialog for a connection. The call to the ERP Connector’s GetConfigurationFields method returns a list of fields and field types. The Admin client builds a dialog with these fields.

## Constructors

### NSFieldMetadata()

```crmscript theme={null}
NSFieldMetadata
```

Initializes a new instance of the NSFieldMetadata class.

## Methods

## GetAccess()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Access restrictions on the field. See \<xref href="CRMScript.NetServer.FieldAccess" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer access = thing.GetAccess();
```

## GetDefaultValue()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - A default value for the field.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String defaultValue = thing.GetDefaultValue();
```

## GetDisplayDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Tooltip for the field name.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String displayDescription = thing.GetDisplayDescription();
```

## GetDisplayName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Localized field name – shown in the GUi.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String displayName = thing.GetDisplayName();
```

## GetFieldKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Internal key/name of the field. Used as the key in the ConnectionConfigField values when TestConnection is called.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String fieldKey = thing.GetFieldKey();
```

## GetFieldType()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Text, Integer, etc. See \<xref href="CRMScript.NetServer.FieldMetadataType" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer fieldType = thing.GetFieldType();
```

## GetListName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - MDO List provider name for list fields.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String listName = thing.GetListName();
```

## GetMaxLength()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Maximum length for strings, if set. 0 means no restriction. (Though sooner or later something will no doubt overflow if you pile on the gigabytes.).

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer maxLength = thing.GetMaxLength();
```

## GetRank()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - A way to set the order of the fields. Lowest value will be displayed first/over the fields with other values.

**Example:**

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

## GetShowInSearch()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - True if this field is displayed in search result.

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Bool showInSearch = thing.GetShowInSearch();
```

## SetAccess(Integer)

```crmscript theme={null}
Void SetAccess(Integer access)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer access;
thing.SetAccess(access);
```

## SetDefaultValue(String)

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

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String defaultValue;
thing.SetDefaultValue(defaultValue);
```

## SetDisplayDescription(String)

```crmscript theme={null}
Void SetDisplayDescription(String displayDescription)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String displayDescription;
thing.SetDisplayDescription(displayDescription);
```

## SetDisplayName(String)

```crmscript theme={null}
Void SetDisplayName(String displayName)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String displayName;
thing.SetDisplayName(displayName);
```

## SetFieldKey(String)

```crmscript theme={null}
Void SetFieldKey(String fieldKey)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String fieldKey;
thing.SetFieldKey(fieldKey);
```

## SetFieldType(Integer)

```crmscript theme={null}
Void SetFieldType(Integer fieldType)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer fieldType;
thing.SetFieldType(fieldType);
```

## SetListName(String)

```crmscript theme={null}
Void SetListName(String listName)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
String listName;
thing.SetListName(listName);
```

## SetMaxLength(Integer)

```crmscript theme={null}
Void SetMaxLength(Integer maxLength)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Integer maxLength;
thing.SetMaxLength(maxLength);
```

## SetRank(Integer)

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

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

**Example:**

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

## SetShowInSearch(Bool)

```crmscript theme={null}
Void SetShowInSearch(Bool showInSearch)
```

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

**Example:**

```crmscript theme={null}
NSFieldMetadata thing;
Bool showInSearch;
thing.SetShowInSearch(showInSearch);
```


## Related topics

- [Update the CRMScript reference](/contribute/how-to-update-crmscript-reference.md)
- [FieldMetadataInfo](/en/api/plugins/erp-connectors/api/field-meta-data-carrier.md)
- [Enum FieldMetadataType](/en/automation/crmscript/reference/CRMScript.NetServer.FieldMetadataType.md)
- [Enum values for FieldMetadataType](/en/database/tables/enums/fieldmetadatatype.md)
- [SuperOffice.WebApi.Data.FieldMetadataDictionary](/en/api/reference/webapi/SuperOffice.WebApi.Data.FieldMetadataDictionary.md)
