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

# DocTmpl table

> DocTmpl list table. Describes templates available for writing new documents.

## DocTmpl Table (130)

DocTmpl MDO list item table.
DocTmpl list table. Describes templates available for writing new documents.

## Fields

| Name                      | Description                                                                                                                                              | Type                                                            | Nullable |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | :------: |
| DocTmpl\_id               | Primary key                                                                                                                                              | PK                                                              |    No    |
| name                      | The list item                                                                                                                                            | String(239)                                                     |    No    |
| rank                      | Rank order                                                                                                                                               | UShort                                                          |    Yes   |
| tooltip                   | Tooltip or other description                                                                                                                             | String(254)                                                     |    Yes   |
| deleted                   | 0 -> record is active 1 -> record is 'deleted' and should not be shown in lists                                                                          | UShort                                                          |    Yes   |
| filename                  | Relative to TemplatePath in SOARC. Plugin specific extref in other doc archives. i.e. Google document URL or Notes id.                                   | String(239)                                                     |    No    |
| autoevent\_id             | Document plugin id - where the documents generated from this template are to be stored. Copied to the document.archiveProvider when document is created. | Id                                                              |    Yes   |
| record\_type              | 1 = app, 2 = doc, 3 = email, 4 = fax, 5 = phone, 6 = todo - see EAppntRecordTypes                                                                        | Enum [DocTmplType](./enums/doctmpltype.mdx)                     |    No    |
| direction                 | 1 = incoming, 2 = outgoing, see EAppntDirection                                                                                                          | Enum [DocTmplDirection](./enums/doctmpldirection.mdx)           |    Yes   |
| saveInDb                  | 1 = save document records in DB; otherwise not.                                                                                                          | UShort                                                          |    Yes   |
| default\_oref             | Processed via tag substitution to give document reference                                                                                                | String(239)                                                     |    Yes   |
| regkey\_open              | Registry key to use for Open, if blank, we simply ask Windows to do the operation for us                                                                 | String(239)                                                     |    Yes   |
| regkey\_edit              | Registry key to use for Edit; if blank, we simply ask Windows to do the operation for us                                                                 | String(239)                                                     |    Yes   |
| regkey\_print             | Registry key to use for Print; if blank, we simply ask Windows to do the operation for us                                                                | String(239)                                                     |    Yes   |
| accelerator               | Accelerator key code for this template                                                                                                                   | UShort                                                          |    Yes   |
| registered                | Registered when                                                                                                                                          | UtcDateTime                                                     |    No    |
| registered\_associate\_id | Registered by whom                                                                                                                                       | FK [associate](./associate.mdx)                                 |    No    |
| updated                   | Last updated when                                                                                                                                        | UtcDateTime                                                     |    No    |
| updated\_associate\_id    | Last updated by whom                                                                                                                                     | FK [associate](./associate.mdx)                                 |    No    |
| updatedCount              | Number of updates made to this record                                                                                                                    | UShort                                                          |    No    |
| defaultPublishType        | Should documents based on this template be published=true? Default state of publish flag on documents.                                                   | Enum [PublishType](./enums/publishtype.mdx)                     |    Yes   |
| intentId                  | What is the intention of this document (used by SAINT)                                                                                                   | FK [Intent](./intent.mdx)                                       |    Yes   |
| mimeType                  | The MIME type, for Web/Browser use of documents of this type                                                                                             | String(254)                                                     |    Yes   |
| loadTemplateFromPlugin    | If nonzero, then this is the ID of the document plugin that should supply the template document file, instead of the default so\_arc/template            | Int                                                             |    Yes   |
| quoteDocType              | The role this document plays in the Quote system, if any                                                                                                 | Enum [DocTmplQuoteType](./enums/doctmplquotetype.mdx)           |    Yes   |
| privacyDocType            | Indicator that this document template has a functional role, related to privacy/GDPR                                                                     | Enum [DocTmplPrivacyType](./enums/doctmplprivacytype.mdx)       |    Yes   |
| emailSubject              | Subject line for document templates that represent an email; template tags are accepted in this item                                                     | String(4000)                                                    |    Yes   |
| includeSignature          | If True, signature (mail.htm) should be added at bottom of template when used                                                                            | Bool                                                            |    Yes   |
| showCurrents              | If True, A dialog or sidebar will be shown for changing current values on Contact, Person                                                                | Bool                                                            |    Yes   |
| senderEmailMode           | Type of sender email setting. Always use senderEmailAddress = 0, Use Our contact = 1, Use Support Associate = 2                                          | Enum [SenderMailMode](./enums/sendermailmode.mdx)               |    Yes   |
| senderEmailAddress        | The email address to use in from field                                                                                                                   | String(256)                                                     |    Yes   |
| invitationDocType         | Type for sending email meeting invitation. Not an invitation type template = 0, New = 1, Changed = 2, Cancelled = 3                                      | Enum [DocTmplInvitationType](./enums/doctmplinvitationtype.mdx) |    Yes   |

<img src="https://mintcdn.com/superofficeas/zNQa3AO19PFK63SB/media/loc/en/database/tables/DocTmpl.png?fit=max&auto=format&n=zNQa3AO19PFK63SB&q=85&s=89ab68d3dbf1658467f0618c4cf16710" alt="DocTmpl table relationship diagram" width="934" height="830" data-path="media/loc/en/database/tables/DocTmpl.png" />

## Indexes

| Fields | Types       | Description |
| ------ | ----------- | ----------- |
| name   | String(239) | Unique      |

## Relationships

| Table                                      | Description                                                                                                                                          |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [associate](./associate)                   | Employees, resources and other users - except for External persons                                                                                   |
| [ConsentSource](./consentsource)           | Consent source for GDPR                                                                                                                              |
| [DocTmplGroupLink](./doctmplgrouplink)     | User group link table for DocTmpl, for MDO item hiding                                                                                               |
| [DocTmplHeadingLink](./doctmplheadinglink) | Heading link table for DocTmpl, for MDO headers                                                                                                      |
| [Intent](./intent)                         | Intent list for SAINT. More information regarding SuperOffice Sales Intelligence on [http://techdoc.superoffice.com](http://techdoc.superoffice.com) |
| [SaleType](./saletype)                     | Type of sale - large solution, incremental, whatever fits the organization                                                                           |
| [SuggestedDocument](./suggesteddocument)   | Unique owner of a set of licensed modules                                                                                                            |

## Replication Flags

* Replicate changes DOWN from central to satellites and travellers.
* Replicate changes UP from satellites and travellers back to central.
* Copy to satellite and travel prototypes.

## Security Flags

* No access control via user's Role.


## Related topics

- [DocTmplHeadingLink table](/en/database/tables/doctmplheadinglink.md)
- [DocTmplGroupLink table](/en/database/tables/doctmplgrouplink.md)
- [Enum DocTmplDirection](/en/automation/crmscript/reference/CRMScript.NetServer.DocTmplDirection.md)
- [Enum DocTmplType](/en/automation/crmscript/reference/CRMScript.NetServer.DocTmplType.md)
- [Enum values for DocTmplDirection](/en/database/tables/enums/doctmpldirection.md)
- [Enum values for DocTmplType](/en/database/tables/enums/doctmpltype.md)
