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

# NSConsentPurpose

> Carrier object for ConsentPurpose.

Carrier object for ConsentPurpose.

## Constructors

### NSConsentPurpose()

```crmscript theme={null}
NSConsentPurpose
```

Initializes a new instance of the NSConsentPurpose class.

## Methods

## GetActive()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Is the consent purpose active or not.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
Integer active = thing.GetActive();
```

## GetConsentPurposeId()

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

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

**Example:**

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

## GetConsentText()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Form text used for the actual checkbox.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String consentText = thing.GetConsentText();
```

## GetDeleted()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - true if the NSConsentPurpose is deleted.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
Bool deleted = thing.GetDeleted();
```

## GetFormText()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Text for the consent form, the long text to be shown when asking the end-user for this kind of consent.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String formText = thing.GetFormText();
```

## GetKey()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The key used to refer to this purpose, like Process, Emarketing etc.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String key = thing.GetKey();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name of consent purpose.

**Example:**

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

## GetPrivacyStatementDesc()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Name or description for the privacy statement.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String privacyStatementDesc = thing.GetPrivacyStatementDesc();
```

## GetPrivacyStatementUrl()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - URL referencing the actual privacy statement.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String privacyStatementUrl = thing.GetPrivacyStatementUrl();
```

## GetRank()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Rank of this consent source.

**Example:**

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

## GetTooltip()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - List item tooltip.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String tooltip = thing.GetTooltip();
```

## GetUpdatedBy()

```crmscript theme={null}
NSAssociate GetUpdatedBy()
```

**Returns:** [CRMScript.NetServer.NSAssociate](CRMScript.NetServer.NSAssociate) - The associate that last updated the consent purpose.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
NSAssociate updatedBy = thing.GetUpdatedBy();
```

## GetUpdatedDate()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The date the consent purpose was last updated.

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
DateTime updatedDate = thing.GetUpdatedDate();
```

## SetActive(Integer)

```crmscript theme={null}
Void SetActive(Integer active)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
Integer active;
thing.SetActive(active);
```

## SetConsentPurposeId(Integer)

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

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

**Example:**

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

## SetConsentText(String)

```crmscript theme={null}
Void SetConsentText(String consentText)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String consentText;
thing.SetConsentText(consentText);
```

## SetDeleted(Bool)

```crmscript theme={null}
Void SetDeleted(Bool deleted)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
Bool deleted;
thing.SetDeleted(deleted);
```

## SetFormText(String)

```crmscript theme={null}
Void SetFormText(String formText)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String formText;
thing.SetFormText(formText);
```

## SetKey(String)

```crmscript theme={null}
Void SetKey(String key)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String key;
thing.SetKey(key);
```

## SetName(String)

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

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

**Example:**

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

## SetPrivacyStatementDesc(String)

```crmscript theme={null}
Void SetPrivacyStatementDesc(String privacyStatementDesc)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String privacyStatementDesc;
thing.SetPrivacyStatementDesc(privacyStatementDesc);
```

## SetPrivacyStatementUrl(String)

```crmscript theme={null}
Void SetPrivacyStatementUrl(String privacyStatementUrl)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String privacyStatementUrl;
thing.SetPrivacyStatementUrl(privacyStatementUrl);
```

## SetRank(Integer)

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

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

**Example:**

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

## SetTooltip(String)

```crmscript theme={null}
Void SetTooltip(String tooltip)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
String tooltip;
thing.SetTooltip(tooltip);
```

## SetUpdatedBy(NSAssociate)

```crmscript theme={null}
Void SetUpdatedBy(NSAssociate updatedBy)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
NSAssociate updatedBy;
thing.SetUpdatedBy(updatedBy);
```

## SetUpdatedDate(DateTime)

```crmscript theme={null}
Void SetUpdatedDate(DateTime updatedDate)
```

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

**Example:**

```crmscript theme={null}
NSConsentPurpose thing;
DateTime updatedDate;
thing.SetUpdatedDate(updatedDate);
```


## Related topics

- [NSConsentPerson](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentPerson.md)
- [NSConsentInfo](/en/automation/crmscript/reference/CRMScript.NetServer.NSConsentInfo.md)
- [NSListAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSListAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [ConsentPurpose](/en/api/archive-providers/reference/consentpurpose.md)
- [Save Consent Purpose](/en/api/reference/restful/agent/list_agent/save-consent-purpose.md)
