document Table (10)

Documents, this table is an extension of the Appointment table. There is always a corresponding appointment record; the relation between appointment and document is navigable in both directions. A document-type appointment record always has a corresponding document record and a record in VisibleFor specifying who may see this.

Fields

NameDescriptionTypeNull
document_idPrimary keyPK
application_idApplication this document was made withFK ExtApp
nameFile nameString(511)
headerVisible document nameString(219)
our_refOur reference, searchable field from freetext searchString(99)
your_refYour referenceString(99)
searchnameSearchable name (not used?)String(99)
attentionAttention/salutationString(99)
text_idPointer to optional long descriptionFK text
archiveProviderDocument plugin id copied from the DocTmpl.autoevent_id - tells us where the document content is storedId
appointment_idpoints back to owning appointmentFK appointment
registeredRegistered whenUtcDateTime
registered_associate_idRegistered by whomFK associate
updatedLast updated whenUtcDateTime
updated_associate_idLast updated by whomFK associate
updatedCountNumber of updates made to this recordUShort
extrefExternal reference (notes ID, email ID, URL, whatever) for use by document plugin in locating document contentString(511)
userdef_idUser-defined fieldsFK uddocsmall
userdef2_idUser-defined fieldsFK uddoclarge
snumThe sequence number allocated from refcount on used template when creating the documentInt
ExtUrlFor DocPlugin-internal use only. Used to optionally cache URL of external documents.String(1023)
contentSetCountNumber of times content has been set on this document.Int

document table relationship diagram

Indexes

FieldsTypesDescription
document_idPKClustered, Unique
headerString(219)Index
our_refString(99)Index
searchnameString(99)Index
archiveProviderIdIndex
extrefString(511)Index
userdef_idFKIndex
userdef2_idFKIndex

Relationships

TableDescription
appointmentTasks, appointments, followups, phone calls; and documents (document_id != 0). An appointment always has a corresponding record in VisibleFor specifying who may see this.
associateEmployees, resources and other users - except for External persons
email_itemEmail data
ExtAppExtApp list table. Applications startable from SuperOffice
QuoteQuote root level, at most one per Sale, always connected to one Sale
QuoteVersionAttachmentActual attachments to a quote
s_messageA message used in a shipment. Can be html and/or plain text
s_shipmentContains info about one shipment. The addresses are stored in s_shipment_addr
SaleTypeQuoteAttachmentDefault attachments to quotes linked to sales of this type
textLong text fields from all over the system
uddoclargeUser-defined fields
uddocsmallUser-defined fields

Replication Flags

  • Area Management controlled table. Contents replicated to satellites and traveller databases.
  • Replicate changes UP from satellites and travellers back to central.
  • Copy to satellite and travel prototypes.
  • Cache table during filtering.

Security Flags

  • Sentry controls access to items in this table using user’s Role and data rights matrix on the table’s parent.