Table

DocuRef

Document references

Links a document or attachment to another record in the system. Each row says which record it points to (by table ID and record ID), the document type, and the stored document value. It also holds a description, a note and an author. Attachment entities for customers, products and business documents read from it.

Table name
DocuRef
Module
System administration
Table group
WorksheetLine
Table type
Regular
Data per company
No
Configuration key
None
Primary index
RecIdx
Replacement key
None
Key fields
RecId
Model
ApplicationFoundation

Fields (33)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 15 more
ActualCompanyIdCompany that owns the document type used by this reference.String
SelectableDataArea
NoDocuType.dataAreaIdTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 54 more
AuthorThe person who created the document reference.Int64
RefRecId
NoDirPerson.RecIdTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 10 more
ContactPersonIdID of the contact person linked to the document.String (20)
ContactPersonId
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
CreatedByThe user who created the record. System field.String (20)
CreatedBy
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 17 more
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 24 more
DefaultAttachmentYes/No value marking this as the default attachment.Enum
DocuDefaultAttachment
NoYes (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 46 more
DocumentIdUnique GUID that identifies the document.Guid
DocuDocumentId
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 53 more
EncyclopediaItemIdID of the knowledge article item linked to the document.String
smmEncyclopediaItemId
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
EngChgEngineeringDocumentLink to an engineering document record.Int64
EngChgEngineeringDocumentRecId
NoSysAttachmentSyncEntity
EngChgEngineeringReferenceReference code used for engineering.String (36)
EngChgEngineeringReferenceId
NoSysAttachmentSyncEntity
InterCompanySkipUpdateOption that sets whether internal, intercompany or both kinds of update are skipped.Enum
InterCompanySkipUpdate (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
IsCashExpensePurpose not clear from the metadata.low confidenceEnum
NoYes (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpenseCopilotUnattachedDocumentEntityTrvExpMobileUnattachedDocumentEntityand 4 more
isEnabledForVirtualEntitySyncFlag showing whether the row is enabled for synchronisation with a virtual entity.Enum
boolean (enum)
NoSysAttachmentSyncEntity
IsJustificationPurpose not clear from the metadata.low confidenceEnum
NoYes (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 10 more
ModifiedByThe user who last changed the record. System field.String (20)
ModifiedBy
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 1 more
ModifiedDateTimeThe date and time when the record was last changed. System field.UtcDateTime
ModifiedDateTime
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 1 more
NameShort description of the document.String (60)
Description
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 66 more
NotesFree-text note about the document.String (-1)
Notes
NoTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 62 more
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntity
PartyGlobal address book party linked to the document reference.Int64
RefRecId
NoDirPartyTable.RecIdTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntity
RefCompanyIdCompany of the record that the document is attached to.String
SelectableDataArea
YesTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 18 more
RefRecIdSystem record ID of the record the document is attached to.Int64
RefRecId
YesTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 19 more
RefTableIdID of the table that holds the record the document is attached to.Integer
RefTableId
YesTrvCopilotAttachedReceiptEntityTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityand 20 more
RestrictionShows whether the document is internal or external.Enum
DocuRestriction (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 53 more
smmEMailEntryIDEntry ID of an email item, used by sales and marketing.String (255)
smmEMailEntryID
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
smmEMailStoreIDStore ID of the mailbox where an email item is kept, used by sales and marketing.String (300)
smmEMailStoreID
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
smmTableFlag linked to the sales and marketing table.low confidenceEnum
boolean (enum)
NoTrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoSysAttachmentSyncEntity
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TypeIdDocument type of the reference.String (20)
DocuTypeId
YesDocuType.TypeIdTrvExpMobileReceiptEntityBusinessDocumentDocuRefEntityMssLeaveRequestAttachmentEntityand 40 more
ValueRecIdLink to the document value row that holds the file or URL.Int64
RefRecId
NoDocuValue.RecIdTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityTrvExpMobileAttachedDocumentEntityand 9 more

Indexes (11)

Relations (7)

Each relation joins DocuRef to another table on the fields shown.

  • ActualDataArea → DataArea

    Join on ActualCompanyId = DataArea.id, DataArea.isVirtual = null

    Many DocuRef records → zero or one DataArea record

  • DocuType → DocuType

    Join on ActualCompanyId = DocuType.dataAreaId, TypeId = DocuType.TypeId

    Many DocuRef records → exactly one DocuType record

  • DocuValue → DocuValue

    Join on ValueRecId = DocuValue.RecId

    Many DocuRef records → zero or one DocuValue record

  • RefDataArea → DataArea

    Join on RefCompanyId = DataArea.id, DataArea.isVirtual = null

    Many DocuRef records → exactly one DataArea record

  • DirAddressBookParty → DirAddressBookPartyAllView

    Join on Party = DirAddressBookPartyAllView.Party

    Cardinality not set in the metadata.

  • DirPartyTable_FK → DirPartyTable

    Join on Party = DirPartyTable.RecId

    Many DocuRef records → zero or one DirPartyTable record

  • DirPerson → DirPerson

    Join on Author = DirPerson.RecId

    Many DocuRef records → zero or one DirPerson record

Get this data out

Tables are not exposed directly. These public entities read from DocuRef; use one of them in Power BI, Power Platform or a data management project.

Need help with DocuRef in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk