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

# NSHierarchyEntity

## Constructors

### NSHierarchyEntity()

```crmscript theme={null}
NSHierarchyEntity
```

Initializes a new instance of the NSHierarchyEntity class.

## Methods

## GetChildren()

```crmscript theme={null}
NSHierarchyEntity[] GetChildren()
```

**Returns:** [CRMScript.NetServer.NSHierarchyEntity](CRMScript.NetServer.NSHierarchyEntity)\[] - Sub-items, if any.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
NSHierarchyEntity[] children = thing.GetChildren();
```

## GetDomain()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Domain separating the different hierarchy. See \<xref href="CRMScript.NetServer.Domain" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer domain = thing.GetDomain();
```

## GetFullname()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The full name of this category, i.e. Foo/bar/test.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
String fullname = thing.GetFullname();
```

## GetHierarchyId()

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

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer hierarchyId = thing.GetHierarchyId();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of this hierarchy folder.

**Example:**

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

## GetParentId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Parent table.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer parentId = thing.GetParentId();
```

## GetRegistered()

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

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
DateTime registered = thing.GetRegistered();
```

## GetRegisteredAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Registered by whom.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer registeredAssociateId = thing.GetRegisteredAssociateId();
```

## GetUpdated()

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

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
DateTime updated = thing.GetUpdated();
```

## GetUpdatedAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Last updated by whom.

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer updatedAssociateId = thing.GetUpdatedAssociateId();
```

## SetChildren(NSHierarchyEntity\[])

```crmscript theme={null}
Void SetChildren(NSHierarchyEntity[] children)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
NSHierarchyEntity[] children;
thing.SetChildren(children);
```

## SetDomain(Integer)

```crmscript theme={null}
Void SetDomain(Integer domain)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer domain;
thing.SetDomain(domain);
```

## SetFullname(String)

```crmscript theme={null}
Void SetFullname(String fullname)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
String fullname;
thing.SetFullname(fullname);
```

## SetHierarchyId(Integer)

```crmscript theme={null}
Void SetHierarchyId(Integer hierarchyId)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer hierarchyId;
thing.SetHierarchyId(hierarchyId);
```

## SetName(String)

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

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

**Example:**

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

## SetParentId(Integer)

```crmscript theme={null}
Void SetParentId(Integer parentId)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer parentId;
thing.SetParentId(parentId);
```

## SetRegistered(DateTime)

```crmscript theme={null}
Void SetRegistered(DateTime registered)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
DateTime registered;
thing.SetRegistered(registered);
```

## SetRegisteredAssociateId(Integer)

```crmscript theme={null}
Void SetRegisteredAssociateId(Integer registeredAssociateId)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer registeredAssociateId;
thing.SetRegisteredAssociateId(registeredAssociateId);
```

## SetUpdated(DateTime)

```crmscript theme={null}
Void SetUpdated(DateTime updated)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
DateTime updated;
thing.SetUpdated(updated);
```

## SetUpdatedAssociateId(Integer)

```crmscript theme={null}
Void SetUpdatedAssociateId(Integer updatedAssociateId)
```

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

**Example:**

```crmscript theme={null}
NSHierarchyEntity thing;
Integer updatedAssociateId;
thing.SetUpdatedAssociateId(updatedAssociateId);
```


## Related topics

- [NSListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSListAgent.md)
- [NSEmailFlow](/en/automation/crmscript/reference/CRMScript.NetServer.NSEmailFlow.md)
- [Delete Hierarchy Entity](/en/api/reference/restful/rest/hierarchy/delete-hierarchy-entity.md)
- [Post Hierarchy Entity](/en/api/reference/restful/rest/hierarchy/post-hierarchy-entity.md)
- [Get Hierarchy Entity](/en/api/reference/restful/rest/hierarchy/get-hierarchy-entity.md)
- [Default Hierarchy Entity](/en/api/reference/restful/rest/hierarchy/default-hierarchy-entity.md)
