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

# <a id="SuperOffice_WebApi_Data_DocumentTemplate" /> Class DocumentTemplate

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

Carrier object for DocumentTemplate.
The template a document is based on is stored in the SO\_arc\template folder on the server. This will return the name as displayed in the GUI, and not the physical document name, of the template the document object is based on.

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

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Carrier](SuperOffice.WebApi.Data.Carrier.md) ←
[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.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 DocumentTemplate 123 using the WebApi client:
<pre><code class="lang-csharp">var configuration = new WebApiConfiguration(url);
var agent = new ListAgent(configuration);
var documentTemplate = agent.GetDocumentTemplate( 123 );</code></pre>

## Constructors

### <a id="SuperOffice_WebApi_Data_DocumentTemplate__ctor" /> DocumentTemplate()

Default constructor - defaults any enum props to 0.

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

## Properties

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_AutoeventId" /> AutoeventId

Which document plugin is responsible for the documents generated from this template

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

#### Property Value

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

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_DefaultOref" /> DefaultOref

Processed via tag substitution to give document reference

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

#### Property Value

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

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_Deleted" /> Deleted

0 -> record is active 1 -> record is 'deleted' and should not be shown in lists

```csharp theme={null}
public virtual short Deleted { get; set; }
```

#### Property Value

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

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_Direction" /> Direction

1 = incoming, 2 = outgoing, see EAppntDirection
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public DocTmplDirection? Direction { get; set; }
```

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[Direction\_String](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_Direction_String)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_Direction_String" /> Direction\_String

1 = incoming, 2 = outgoing, see EAppntDirection
Raw string enum value.

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

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[Direction](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_Direction)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_DocumentTemplateId" /> DocumentTemplateId

Primary key

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

#### Property Value

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

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_Filename" /> Filename

Relative to TemplatePath

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

#### Property Value

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

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

The list item

```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_DocumentTemplate_QuoteDocType" /> QuoteDocType

What type of quote document is this.
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public DocTmplQuoteType? QuoteDocType { get; set; }
```

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[QuoteDocType\_String](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_QuoteDocType_String)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_QuoteDocType_String" /> QuoteDocType\_String

What type of quote document is this.
Raw string enum value.

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

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[QuoteDocType](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_QuoteDocType)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_RecordType" /> RecordType

1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo - see EAppntRecordTypes
NULL if unknown enum value.

```csharp theme={null}
[JsonIgnore]
public DocTmplType? RecordType { get; set; }
```

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[RecordType\_String](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_RecordType_String)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_RecordType_String" /> RecordType\_String

1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo - see EAppntRecordTypes
Raw string enum value.

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

#### Property Value

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

#### See Also

[DocumentTemplate](SuperOffice.WebApi.Data.DocumentTemplate.md).[RecordType](SuperOffice.WebApi.Data.DocumentTemplate.md#SuperOffice_WebApi_Data_DocumentTemplate_RecordType)

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_SaveInDb" /> SaveInDb

1 = save document records in DB; otherwise not.

```csharp theme={null}
public virtual short SaveInDb { get; set; }
```

#### Property Value

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

### <a id="SuperOffice_WebApi_Data_DocumentTemplate_Tooltip" /> Tooltip

Tooltip or other description

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

#### Property Value

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

## See Also

[ListAgent](SuperOffice.WebApi.Agents.ListAgent.md)


## Related topics

- [SuperOffice.WebApi.Data.DocumentTemplateEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.DocumentTemplateEntity.md)
- [SuperOffice.WebApi.Data.DocumentTemplateMigrationList](/en/api/reference/webapi/SuperOffice.WebApi.Data.DocumentTemplateMigrationList.md)
