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

# SuperOffice.WebApi.Data.TriggerScriptEntity

# <a id="SuperOffice_WebApi_Data_TriggerScriptEntity" /> Class TriggerScriptEntity

Namespace: [SuperOffice.WebApi.Data](SuperOffice.WebApi.Data.md)\
Assembly: SuperOffice.WebApi.dll

Carrier object for TriggerScriptEntity.
CRM Trigger Script - The script runs when a given event fires.

```csharp theme={null}
public class TriggerScriptEntity : Carrier
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Carrier](SuperOffice.WebApi.Data.Carrier.md) ←
[TriggerScriptEntity](SuperOffice.WebApi.Data.TriggerScriptEntity.md)

#### Inherited Members

[Carrier.TableRight](SuperOffice.WebApi.Data.Carrier.md#SuperOffice_WebApi_Data_Carrier_TableRight),
[Carrier.FieldProperties](SuperOffice.WebApi.Data.Carrier.md#SuperOffice_WebApi_Data_Carrier_FieldProperties),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

Get TriggerScriptEntity 123 using the WebApi client:
<pre><code class="lang-csharp">var configuration = new WebApiConfiguration(url);
var agent = new CRMScriptAgent(configuration);
var triggerScriptEntity = agent.GetTriggerScriptEntity( 123 );</code></pre>

## Remarks

Use <xref href="SuperOffice.CRM.Services.ArchiveAgent?text=Archive+agent" data-throw-if-not-resolved="false" />:
All TriggerScriptEntity: <pre><code class="lang-csharp">"EventHandler"</code></pre>

## Constructors

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity__ctor" /> TriggerScriptEntity()

Default constructor - defaults any enum props to 0.

```csharp theme={null}
public TriggerScriptEntity()
```

## Properties

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_Enabled" /> Enabled

Whether this screen chooser is enabled or not

```csharp theme={null}
public virtual bool Enabled { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_Name" /> Name

Optional description of what this script is used for.

```csharp theme={null}
public virtual string Name { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_Registered" /> Registered

Registered when

```csharp theme={null}
public virtual DateTime Registered { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_RegisteredAssociateId" /> RegisteredAssociateId

Registered by whom

```csharp theme={null}
public virtual int RegisteredAssociateId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_ScreenChooserId" /> ScreenChooserId

Primary key

```csharp theme={null}
public virtual int ScreenChooserId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_ScreenType" /> ScreenType

Event id that triggers script.  See EventHandlerType enum.
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public EventHandlerType? ScreenType { get; set; }
```

#### Property Value

[EventHandlerType](SuperOffice.WebApi.Data.EventHandlerType.md)?

#### See Also

[TriggerScriptEntity](SuperOffice.WebApi.Data.TriggerScriptEntity.md).[ScreenType\_String](SuperOffice.WebApi.Data.TriggerScriptEntity.md#SuperOffice_WebApi_Data_TriggerScriptEntity_ScreenType_String)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_ScreenType_String" /> ScreenType\_String

Event id that triggers script.  See EventHandlerType enum.
Raw string enum value.

```csharp theme={null}
[JsonProperty("ScreenType")]
public string ScreenType_String { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

#### See Also

[TriggerScriptEntity](SuperOffice.WebApi.Data.TriggerScriptEntity.md).[ScreenType](SuperOffice.WebApi.Data.TriggerScriptEntity.md#SuperOffice_WebApi_Data_TriggerScriptEntity_ScreenType)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_Source" /> Source

The CRMscript code for this event handler

```csharp theme={null}
public virtual string Source { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_UniqueIdentifier" /> UniqueIdentifier

Global unique identifier, accross customers/tenants

```csharp theme={null}
public virtual string UniqueIdentifier { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_Updated" /> Updated

Last updated when

```csharp theme={null}
public virtual DateTime Updated { get; set; }
```

#### Property Value

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

### <a id="SuperOffice_WebApi_Data_TriggerScriptEntity_UpdatedAssociateId" /> UpdatedAssociateId

Last updated by whom

```csharp theme={null}
public virtual int UpdatedAssociateId { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

## See Also

[CRMScriptAgent](SuperOffice.WebApi.Agents.CRMScriptAgent.md),
[ArchiveAgent](SuperOffice.WebApi.Agents.ArchiveAgent.md),


## Related topics

- [SuperOffice.WebApi.Agents.ICRMScriptAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ICRMScriptAgent.md)
- [SuperOffice.WebApi.Agents.CRMScriptAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.CRMScriptAgent.md)
- [SuperOffice.WebApi.Data.CRMScript SaveTriggerScriptByUniqueIdRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.CRMScript_SaveTriggerScriptByUniqueIdRequest.md)
- [SuperOffice.WebApi.Data.ChatTopicEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.ChatTopicEntity.md)
- [SuperOffice.WebApi.Data.CRMScript ValidateTriggerScriptRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.CRMScript_ValidateTriggerScriptRequest.md)
- [SuperOffice.WebApi.Data.CRMScript DeleteTriggerScriptByUniqueIdRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.CRMScript_DeleteTriggerScriptByUniqueIdRequest.md)
