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

# NSModuleLicense

> Represents a single module license info.

Represents a single module license info.

## Constructors

### NSModuleLicense()

```crmscript theme={null}
NSModuleLicense
```

Initializes a new instance of the NSModuleLicense class.

## Methods

## GetAllowedUserType()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Allowed associate type for user licenses internal(0), external(4).

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer allowedUserType = thing.GetAllowedUserType();
```

## GetExtraFlags()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Unspecified extra flags of license, part of checksum. Value=1 means this a 'user plan'; such licenses cause the admin gui to switch to radiobutton view.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer extraFlags = thing.GetExtraFlags();
```

## GetExtraInfo()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Free field, can be used by the module owner (for example host domain, for Service).

<Note>
  For rows with extraFlags=1 this field contains the list of modules that this plan comprises
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String extraInfo = thing.GetExtraInfo();
```

## GetIsHidden()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - If true, then this module should not appear in GUI and is not assignable by users.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Bool isHidden = thing.GetIsHidden();
```

## GetLicenseType()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Entire system, per database, or per associate. See \<xref href="CRMScript.NetServer.LicenseType" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer licenseType = thing.GetLicenseType();
```

## GetModuleDescription()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Human-readable description of module, shown in GUI, default language.

<Note>
  Additional languages can be added to LocaleText, resource type 25
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleDescription = thing.GetModuleDescription();
```

## GetModuleName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the module, not visible in GUI but used in the code.

<Note>
  This must be in UPPER CASE and only contain A-Z and 0-9. NO EXTENDED CHARACTERS please.
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleName = thing.GetModuleName();
```

## GetModuleTooltip()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Tooltip text, anything you want; shown when the cursor hovers over the line in the GUI. Default language.

<Note>
  Additional languages can be added to LocaleText, resource type 27
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleTooltip = thing.GetModuleTooltip();
```

## GetModuleVersion()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Version string for this module.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleVersion = thing.GetModuleVersion();
```

## GetNumberOfLicenses()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Number of licenses purchased.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer numberOfLicenses = thing.GetNumberOfLicenses();
```

## GetOwnerName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the module owner, not visible in GUI but used in the code.

<Note>
  OwnerName SUPEROFFICE is reserved and may NEVER be used by partners. This must be in UPPER CASE and only contain A-Z and 0-9. NO EXTENDED CHARACTERS please.
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String ownerName = thing.GetOwnerName();
```

## GetPrerequisiteModuleName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - If set, specifies a module license needed before this license can be granted.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String prerequisiteModuleName = thing.GetPrerequisiteModuleName();
```

## GetSignature()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Signature that verifies that this row is correctly transferred from SuperLicense.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String signature = thing.GetSignature();
```

## GetSortOrder()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Ordering value, generated by SuperLicense and transferred here. Must be followed for signatures to be correct.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer sortOrder = thing.GetSortOrder();
```

## GetUnrestricted()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - If true, then there is no licenseNumber limit on how many of these modules may be assigned.

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Bool unrestricted = thing.GetUnrestricted();
```

## SetAllowedUserType(Integer)

```crmscript theme={null}
Void SetAllowedUserType(Integer allowedUserType)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer allowedUserType;
thing.SetAllowedUserType(allowedUserType);
```

## SetExtraFlags(Integer)

```crmscript theme={null}
Void SetExtraFlags(Integer extraFlags)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer extraFlags;
thing.SetExtraFlags(extraFlags);
```

## SetExtraInfo(String)

```crmscript theme={null}
Void SetExtraInfo(String extraInfo)
```

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

<Note>
  For rows with extraFlags=1 this field contains the list of modules that this plan comprises
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String extraInfo;
thing.SetExtraInfo(extraInfo);
```

## SetIsHidden(Bool)

```crmscript theme={null}
Void SetIsHidden(Bool isHidden)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Bool isHidden;
thing.SetIsHidden(isHidden);
```

## SetLicenseType(Integer)

Sets the licence type.

```crmscript theme={null}
Void SetLicenseType(Integer licenseType)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer licenseType;
thing.SetLicenseType(licenseType);
```

## SetModuleDescription(String)

```crmscript theme={null}
Void SetModuleDescription(String moduleDescription)
```

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

<Note>
  Additional languages can be added to LocaleText, resource type 25
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleDescription;
thing.SetModuleDescription(moduleDescription);
```

## SetModuleName(String)

```crmscript theme={null}
Void SetModuleName(String moduleName)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleName;
thing.SetModuleName(moduleName);
```

## SetModuleTooltip(String)

```crmscript theme={null}
Void SetModuleTooltip(String moduleTooltip)
```

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

<Note>
  Additional languages can be added to LocaleText, resource type 27
</Note>

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleTooltip;
thing.SetModuleTooltip(moduleTooltip);
```

## SetModuleVersion(String)

```crmscript theme={null}
Void SetModuleVersion(String moduleVersion)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String moduleVersion;
thing.SetModuleVersion(moduleVersion);
```

## SetNumberOfLicenses(Integer)

```crmscript theme={null}
Void SetNumberOfLicenses(Integer numberOfLicenses)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer numberOfLicenses;
thing.SetNumberOfLicenses(numberOfLicenses);
```

## SetOwnerName(String)

```crmscript theme={null}
Void SetOwnerName(String ownerName)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String ownerName;
thing.SetOwnerName(ownerName);
```

## SetPrerequisiteModuleName(String)

```crmscript theme={null}
Void SetPrerequisiteModuleName(String prerequisiteModuleName)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String prerequisiteModuleName;
thing.SetPrerequisiteModuleName(prerequisiteModuleName);
```

## SetSignature(String)

```crmscript theme={null}
Void SetSignature(String signature)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
String signature;
thing.SetSignature(signature);
```

## SetSortOrder(Integer)

```crmscript theme={null}
Void SetSortOrder(Integer sortOrder)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Integer sortOrder;
thing.SetSortOrder(sortOrder);
```

## SetUnrestricted(Bool)

```crmscript theme={null}
Void SetUnrestricted(Bool unrestricted)
```

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

**Example:**

```crmscript theme={null}
NSModuleLicense thing;
Bool unrestricted;
thing.SetUnrestricted(unrestricted);
```


## Related topics

- [NSExtendedModuleLicense](/en/automation/crmscript/reference/CRMScript.NetServer.NSExtendedModuleLicense.md)
- [NSLicenseInfo](/en/automation/crmscript/reference/CRMScript.NetServer.NSLicenseInfo.md)
- [NSLicenseAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSLicenseAgent.md)
- [NSModuleLicenseLink](/en/automation/crmscript/reference/CRMScript.NetServer.NSModuleLicenseLink.md)
- [NSLicenseOwner](/en/automation/crmscript/reference/CRMScript.NetServer.NSLicenseOwner.md)
- [Module licenses](/en/admin/license/dev/module-licenses.md)
