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

# external_document table

> This table stores documents which can be viewed externaly, through the customer module

## external\_document Table (401)

This table stores documents which can be viewed externaly, through the customer module

## Fields

| Name           | Description                                                                  | Type                              | Nullable |
| -------------- | ---------------------------------------------------------------------------- | --------------------------------- | :------: |
| id             | Primary key                                                                  | PK                                |    No    |
| hierarchy\_id  | This document belongs to the following folder                                | FK [hierarchy](./hierarchy.mdx)   |    No    |
| attachment\_id | The attachment.id for the attachment associated with this external document. | FK [attachment](./attachment.mdx) |    No    |
| title          | The title for the document                                                   | String(255)                       |    No    |
| description    | The description of the external document                                     | Clob                              |    Yes   |
| created\_at    | When the document was created                                                | DateTime                          |    Yes   |
| created\_by    | Who created the document                                                     | FK [ejuser](./ejuser.mdx)         |    No    |
| last\_changed  | When the document last was changed                                           | DateTime                          |    Yes   |
| changed\_by    | Who last changed the document                                                | FK [ejuser](./ejuser.mdx)         |    Yes   |
| deleted        | A boolean telling if the external document is to be treated as deleted       | Bool                              |    No    |
| s\_message     | Relation to s\_message if this document is an image in a newsletter          | FK [s\_message](./s-message.mdx)  |    Yes   |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/external_document.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=9d0aa27c55d0045e73fe1f2d78b7aea9" alt="external_document table relationship diagram" width="848" height="794" data-path="media/loc/en/database/tables/external_document.png" />

## Indexes

| Fields         | Types       | Description |
| -------------- | ----------- | ----------- |
| hierarchy\_id  | FK          | Index       |
| attachment\_id | FK          | Index       |
| title          | String(255) | Index       |
| created\_by    | FK          | Index       |
| changed\_by    | FK          | Index       |
| s\_message     | FK          | Index       |

## Relationships

| Table                      | Description                                                                                                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [attachment](./attachment) | This table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table. |
| [ejuser](./ejuser)         | This table contains entries for the users of the system.                                                                                                      |
| [hierarchy](./hierarchy)   | This table contains folders used to group the extra tables in the system.                                                                                     |
| [s\_message](./s-message)  | A message used in a shipment. Can be html and/or plain text                                                                                                   |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [document table](/en/database/tables/document.md)
- [SuggestedDocument table](/en/database/tables/suggesteddocument.md)
- [externaldocuments](/en/api/archive-providers/reference/externaldocuments.md)
- [externaldocumentfolders](/en/api/archive-providers/reference/externaldocumentfolders.md)
- [externaldocumentitems](/en/api/archive-providers/reference/externaldocumentitems.md)
- [SuperOffice.WebApi.Data.Domain](/en/api/reference/webapi/SuperOffice.WebApi.Data.Domain.md)
