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

# NSContactActivity

> Carrier object for ContactActivity.

Carrier object for ContactActivity.

## Constructors

### NSContactActivity()

```crmscript theme={null}
NSContactActivity
```

Initializes a new instance of the NSContactActivity class.

## Methods

## GetAction()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The activity that has occurred on this contact. See \<xref href="CRMScript.NetServer.ContactAction" data-throw-if-not-resolved="false">\</xref>.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer action = thing.GetAction();
```

## GetActionId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of the last element an activity was found on () AppointmentId, ContactId, or PersonId).

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer actionId = thing.GetActionId();
```

## GetActionTime()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - The time of the activity. If more than one activity has occurred on the contact, the last activity time is shown.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
DateTime actionTime = thing.GetActionTime();
```

## GetActivityPersonId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID of the person causing the activity.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer activityPersonId = thing.GetActivityPersonId();
```

## GetActivityPersonName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The person that carried out the activity on the contact.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String activityPersonName = thing.GetActivityPersonName();
```

## GetAssociateFullName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The contact's owner.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String associateFullName = thing.GetAssociateFullName();
```

## GetAssociateId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Our contact.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer associateId = thing.GetAssociateId();
```

## GetCategory()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The contact category.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String category = thing.GetCategory();
```

## GetContactId()

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

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer contactId = thing.GetContactId();
```

## GetDepartment()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Department.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String department = thing.GetDepartment();
```

## GetName()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Contact name.

**Example:**

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

## GetOrgNr()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - VAT number or similar.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String orgNr = thing.GetOrgNr();
```

## GetPersonId()

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

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

**Example:**

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

## GetURL()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - URL address.

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String uRL = thing.GetURL();
```

## SetAction(Integer)

```crmscript theme={null}
Void SetAction(Integer action)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer action;
thing.SetAction(action);
```

## SetActionId(Integer)

```crmscript theme={null}
Void SetActionId(Integer actionId)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer actionId;
thing.SetActionId(actionId);
```

## SetActionTime(DateTime)

```crmscript theme={null}
Void SetActionTime(DateTime actionTime)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
DateTime actionTime;
thing.SetActionTime(actionTime);
```

## SetActivityPersonId(Integer)

```crmscript theme={null}
Void SetActivityPersonId(Integer activityPersonId)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer activityPersonId;
thing.SetActivityPersonId(activityPersonId);
```

## SetActivityPersonName(String)

```crmscript theme={null}
Void SetActivityPersonName(String activityPersonName)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String activityPersonName;
thing.SetActivityPersonName(activityPersonName);
```

## SetAssociateFullName(String)

```crmscript theme={null}
Void SetAssociateFullName(String associateFullName)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String associateFullName;
thing.SetAssociateFullName(associateFullName);
```

## SetAssociateId(Integer)

```crmscript theme={null}
Void SetAssociateId(Integer associateId)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer associateId;
thing.SetAssociateId(associateId);
```

## SetCategory(String)

```crmscript theme={null}
Void SetCategory(String category)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String category;
thing.SetCategory(category);
```

## SetContactId(Integer)

```crmscript theme={null}
Void SetContactId(Integer contactId)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
Integer contactId;
thing.SetContactId(contactId);
```

## SetDepartment(String)

```crmscript theme={null}
Void SetDepartment(String department)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String department;
thing.SetDepartment(department);
```

## SetName(String)

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

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

**Example:**

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

## SetOrgNr(String)

```crmscript theme={null}
Void SetOrgNr(String orgNr)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String orgNr;
thing.SetOrgNr(orgNr);
```

## SetPersonId(Integer)

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

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

**Example:**

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

## SetURL(String)

```crmscript theme={null}
Void SetURL(String uRL)
```

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

**Example:**

```crmscript theme={null}
NSContactActivity thing;
String uRL;
thing.SetURL(uRL);
```


## Related topics

- [NSContactAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSContactAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [ContactActivity](/en/api/archive-providers/reference/contactactivity.md)
- [Activity](/en/api/archive-providers/reference/activity.md)
- [Activities](/en/api/reference/restful/rest/contact/activities.md)
