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

# NSWebAppUsage

## Constructors

### NSWebAppUsage()

```crmscript theme={null}
NSWebAppUsage
```

Initializes a new instance of the NSWebAppUsage class.

## Methods

## GetAggregateBin()

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

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer aggregateBin = thing.GetAggregateBin();
```

## GetAggregateCount()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Number of times the specific soprotocol is accessed.

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer aggregateCount = thing.GetAggregateCount();
```

## GetAssocId()

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

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer assocId = thing.GetAssocId();
```

## GetTimestamp()

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

**Returns:** [CRMScript.Global.DateTime](CRMScript.Global.DateTime) - Which day the usage was logged.

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
DateTime timestamp = thing.GetTimestamp();
```

## GetVersion()

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

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer version = thing.GetVersion();
```

## GetViewState()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The SoProtocol(ViewState).

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
String viewState = thing.GetViewState();
```

## GetWebAppUsageId()

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

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer webAppUsageId = thing.GetWebAppUsageId();
```

## SetAggregateBin(Integer)

```crmscript theme={null}
Void SetAggregateBin(Integer aggregateBin)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer aggregateBin;
thing.SetAggregateBin(aggregateBin);
```

## SetAggregateCount(Integer)

```crmscript theme={null}
Void SetAggregateCount(Integer aggregateCount)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer aggregateCount;
thing.SetAggregateCount(aggregateCount);
```

## SetAssocId(Integer)

```crmscript theme={null}
Void SetAssocId(Integer assocId)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer assocId;
thing.SetAssocId(assocId);
```

## SetTimestamp(DateTime)

```crmscript theme={null}
Void SetTimestamp(DateTime timestamp)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
DateTime timestamp;
thing.SetTimestamp(timestamp);
```

## SetVersion(Integer)

```crmscript theme={null}
Void SetVersion(Integer version)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer version;
thing.SetVersion(version);
```

## SetViewState(String)

```crmscript theme={null}
Void SetViewState(String viewState)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
String viewState;
thing.SetViewState(viewState);
```

## SetWebAppUsageId(Integer)

```crmscript theme={null}
Void SetWebAppUsageId(Integer webAppUsageId)
```

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

**Example:**

```crmscript theme={null}
NSWebAppUsage thing;
Integer webAppUsageId;
thing.SetWebAppUsageId(webAppUsageId);
```


## Related topics

- [NSDiagnosticsAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSDiagnosticsAgent.md)
- [Add Web App Usage](/en/api/reference/restful/agent/diagnostics_agent/add-web-app-usage.md)
- [WebAppUsage](/en/api/archive-providers/reference/webappusage.md)
- [WebAppUsage table](/en/database/tables/webappusage.md)
- [Get Web App Usages For Period](/en/api/reference/restful/agent/diagnostics_agent/get-web-app-usages-for-period.md)
- [Web App Usage Exists In Period](/en/api/reference/restful/agent/diagnostics_agent/web-app-usage-exists-in-period.md)
