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

# NSConsentPerson

> Carrier object for ConsentPerson.

Carrier object for ConsentPerson.

## Constructors

### NSConsentPerson()

```crmscript theme={null}
NSConsentPerson
```

Initializes a new instance of the NSConsentPerson class.

## Methods

## GetComment()

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

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

**Example:**

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

## GetConsentPersonId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ConsentPerson Id.

**Example:**

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

## GetConsentPurpose()

```crmscript theme={null}
NSConsentPurpose GetConsentPurpose()
```

**Returns:** [CRMScript.NetServer.NSConsentPurpose](CRMScript.NetServer.NSConsentPurpose) - The consent purpose.

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSConsentPurpose consentPurpose = thing.GetConsentPurpose();
```

## GetConsentSource()

```crmscript theme={null}
NSConsentSource GetConsentSource()
```

**Returns:** [CRMScript.NetServer.NSConsentSource](CRMScript.NetServer.NSConsentSource) - The consent source.

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSConsentSource consentSource = thing.GetConsentSource();
```

## GetLegalBase()

```crmscript theme={null}
NSLegalBase GetLegalBase()
```

**Returns:** [CRMScript.NetServer.NSLegalBase](CRMScript.NetServer.NSLegalBase) - The legal base.

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSLegalBase legalBase = thing.GetLegalBase();
```

## GetPersonId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Person Id.

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
Integer personId = thing.GetPersonId();
```

## SetComment(String)

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

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

**Example:**

```crmscript theme={null}
NSConsentPerson 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}
NSConsentPerson thing;
Integer consentPersonId;
thing.SetConsentPersonId(consentPersonId);
```

## SetConsentPurpose(NSConsentPurpose)

```crmscript theme={null}
Void SetConsentPurpose(NSConsentPurpose consentPurpose)
```

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

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSConsentPurpose consentPurpose;
thing.SetConsentPurpose(consentPurpose);
```

## SetConsentSource(NSConsentSource)

```crmscript theme={null}
Void SetConsentSource(NSConsentSource consentSource)
```

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

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSConsentSource consentSource;
thing.SetConsentSource(consentSource);
```

## SetLegalBase(NSLegalBase)

```crmscript theme={null}
Void SetLegalBase(NSLegalBase legalBase)
```

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

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
NSLegalBase legalBase;
thing.SetLegalBase(legalBase);
```

## SetPersonId(Integer)

```crmscript theme={null}
Void SetPersonId(Integer personId)
```

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

**Example:**

```crmscript theme={null}
NSConsentPerson thing;
Integer personId;
thing.SetPersonId(personId);
```


## Related topics

- [NSPersonAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSPersonAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [Get Consent Person](/en/api/reference/restful/agent/person_agent/get-consent-person.md)
- [Save Consent Person](/en/api/reference/restful/agent/person_agent/save-consent-person.md)
- [Delete Consent Person](/en/api/reference/restful/agent/person_agent/delete-consent-person.md)
- [ConsentPerson table](/en/database/tables/consentperson.md)
