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

# NSConsentInfo

> Consent information for a give person. Consents are for a particular Purpose, and may be withdrawn (see LegalBase).

Consent information for a give person. Consents are for a particular Purpose, and may be withdrawn (see LegalBase).

## Constructors

### NSConsentInfo()

```crmscript theme={null}
NSConsentInfo
```

Initializes a new instance of the NSConsentInfo class.

## Methods

## GetComment()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Comment regarding this specific consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String comment = thing.GetComment();
```

## GetConsentPersonId()

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

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentPersonId = thing.GetConsentPersonId();
```

## GetConsentPurposeId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key for the NSConsentPurpose associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentPurposeId = thing.GetConsentPurposeId();
```

## GetConsentPurposeKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Key of the NSConsentPurpose associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentPurposeKey = thing.GetConsentPurposeKey();
```

## GetConsentPurposeName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of the NSConsentPurpose associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentPurposeName = thing.GetConsentPurposeName();
```

## GetConsentSourceId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key for the NSConsentSource associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentSourceId = thing.GetConsentSourceId();
```

## GetConsentSourceKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Key of the NSConsentSource associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentSourceKey = thing.GetConsentSourceKey();
```

## GetConsentSourceName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of the NSConsentSource associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentSourceName = thing.GetConsentSourceName();
```

## GetLegalBaseId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Primary key for the NSLegalBase associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer legalBaseId = thing.GetLegalBaseId();
```

## GetLegalBaseKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Key for the NSLegalBase associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String legalBaseKey = thing.GetLegalBaseKey();
```

## GetLegalBaseName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of the NSLegalBase associated with this consent.

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String legalBaseName = thing.GetLegalBaseName();
```

## GetRegistered()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - When this consent record was created.

**Example:**

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

## GetRegisteredAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The ID of the associate who created this record.

**Example:**

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

## GetUpdated()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - When this consent record was last updated.

**Example:**

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

## GetUpdatedAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The ID of the associate who last updated this record.

**Example:**

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

## SetComment(String)

```crmscript theme={null}
Void SetComment(String comment)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String comment;
thing.SetComment(comment);
```

## SetConsentPersonId(Integer)

```crmscript theme={null}
Void SetConsentPersonId(Integer consentPersonId)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentPersonId;
thing.SetConsentPersonId(consentPersonId);
```

## SetConsentPurposeId(Integer)

```crmscript theme={null}
Void SetConsentPurposeId(Integer consentPurposeId)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentPurposeId;
thing.SetConsentPurposeId(consentPurposeId);
```

## SetConsentPurposeKey(String)

```crmscript theme={null}
Void SetConsentPurposeKey(String consentPurposeKey)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentPurposeKey;
thing.SetConsentPurposeKey(consentPurposeKey);
```

## SetConsentPurposeName(String)

```crmscript theme={null}
Void SetConsentPurposeName(String consentPurposeName)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentPurposeName;
thing.SetConsentPurposeName(consentPurposeName);
```

## SetConsentSourceId(Integer)

```crmscript theme={null}
Void SetConsentSourceId(Integer consentSourceId)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer consentSourceId;
thing.SetConsentSourceId(consentSourceId);
```

## SetConsentSourceKey(String)

```crmscript theme={null}
Void SetConsentSourceKey(String consentSourceKey)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentSourceKey;
thing.SetConsentSourceKey(consentSourceKey);
```

## SetConsentSourceName(String)

```crmscript theme={null}
Void SetConsentSourceName(String consentSourceName)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String consentSourceName;
thing.SetConsentSourceName(consentSourceName);
```

## SetLegalBaseId(Integer)

```crmscript theme={null}
Void SetLegalBaseId(Integer legalBaseId)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
Integer legalBaseId;
thing.SetLegalBaseId(legalBaseId);
```

## SetLegalBaseKey(String)

```crmscript theme={null}
Void SetLegalBaseKey(String legalBaseKey)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String legalBaseKey;
thing.SetLegalBaseKey(legalBaseKey);
```

## SetLegalBaseName(String)

```crmscript theme={null}
Void SetLegalBaseName(String legalBaseName)
```

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

**Example:**

```crmscript theme={null}
NSConsentInfo thing;
String legalBaseName;
thing.SetLegalBaseName(legalBaseName);
```

## SetRegistered(DateTime)

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

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

**Example:**

```crmscript theme={null}
NSConsentInfo 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}
NSConsentInfo 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}
NSConsentInfo 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}
NSConsentInfo thing;
Integer updatedAssociateId;
thing.SetUpdatedAssociateId(updatedAssociateId);
```


## Related topics

- [NSPersonAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPersonAgent.md)
- [NSPersonEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSPersonEntity.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [Get Consent Infos](/en/api/reference/restful/rest/person/get-consent-infos.md)
- [SuperOffice.WebApi.Data.ConsentInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ConsentInfo.md)
