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

# NSEventData

> Data related to event handlers.

Data related to event handlers.

## Constructors

### NSEventData()

```crmscript theme={null}
NSEventData
```

Initializes a new instance of the NSEventData class.

## Methods

## GetBlockExecution()

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

**Returns:** [CRMScript.Global.Bool](CRMScript.Global.Bool) - Whether the context should stop what it is doing (for example, stop saving a sale).

**Example:**

```crmscript theme={null}
NSEventData thing;
Bool blockExecution = thing.GetBlockExecution();
```

## GetException()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - String containing error message from handler system if it failed.

**Example:**

```crmscript theme={null}
NSEventData thing;
String exception = thing.GetException();
```

## GetInputValues()

```crmscript theme={null}
Map GetInputValues()
```

**Returns:** [CRMScript.Native.Map](CRMScript.Native.Map) - Environment values sent to the event handler.

**Example:**

```crmscript theme={null}
NSEventData thing;
Map inputValues = thing.GetInputValues();
```

## GetMessage()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - A message to be presented to the user.

**Example:**

```crmscript theme={null}
NSEventData thing;
String message = thing.GetMessage();
```

## GetNavigateTo()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Where the context should navigate afterwards.

**Example:**

```crmscript theme={null}
NSEventData thing;
String navigateTo = thing.GetNavigateTo();
```

## GetOutputValues()

```crmscript theme={null}
Map GetOutputValues()
```

**Returns:** [CRMScript.Native.Map](CRMScript.Native.Map) - Values sent back to the environment from the event handler.

**Example:**

```crmscript theme={null}
NSEventData thing;
Map outputValues = thing.GetOutputValues();
```

## GetStateValues()

```crmscript theme={null}
Map GetStateValues()
```

**Returns:** [CRMScript.Native.Map](CRMScript.Native.Map) - Values kept between event handlers.

**Example:**

```crmscript theme={null}
NSEventData thing;
Map stateValues = thing.GetStateValues();
```

## GetType()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The type of event we are triggered by. See \<xref href="CRMScript.NetServer.EventHandlerType" data-throw-if-not-resolved="false">\</xref>

**Example:**

```crmscript theme={null}
NSEventData thing;
Integer type = thing.GetType();
```

## SetBlockExecution(Bool)

```crmscript theme={null}
Void SetBlockExecution(Bool blockExecution)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
Bool blockExecution;
thing.SetBlockExecution(blockExecution);
```

## SetException(String)

```crmscript theme={null}
Void SetException(String exception)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
String exception;
thing.SetException(exception);
```

## SetInputValues(Map)

```crmscript theme={null}
Void SetInputValues(Map inputValues)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
Map inputValues;
thing.SetInputValues(inputValues);
```

## SetMessage(String)

```crmscript theme={null}
Void SetMessage(String message)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
String message;
thing.SetMessage(message);
```

## SetNavigateTo(String)

```crmscript theme={null}
Void SetNavigateTo(String navigateTo)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
String navigateTo;
thing.SetNavigateTo(navigateTo);
```

## SetOutputValues(Map)

```crmscript theme={null}
Void SetOutputValues(Map outputValues)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
Map outputValues;
thing.SetOutputValues(outputValues);
```

## SetStateValues(Map)

```crmscript theme={null}
Void SetStateValues(Map stateValues)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
Map stateValues;
thing.SetStateValues(stateValues);
```

## SetType(Integer)

```crmscript theme={null}
Void SetType(Integer type)
```

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

**Example:**

```crmscript theme={null}
NSEventData thing;
Integer type;
thing.SetType(type);
```


## Related topics

- [NSCustomerServiceAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSCustomerServiceAgent.md)
- [EventData](/en/automation/crmscript/reference/CRMScript.Native.EventData.md)
- [EventDataDialogDefinition](/en/automation/crmscript/reference/CRMScript.Native.EventDataDialogDefinition.md)
- [EventDataDialogField](/en/automation/crmscript/reference/CRMScript.Native.EventDataDialogField.md)
- [Add CRM data to Outlook event](/integrations/superoffice-for-outlook/add-crm-data-to-event.md)
