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 description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 15 more | |
ActualCompanyIdCompany that owns the document type used by this reference. | StringSelectableDataArea | No | DocuType.dataAreaId | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 54 more |
AuthorThe person who created the document reference. | Int64RefRecId | No | DirPerson.RecId | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 10 more |
ContactPersonIdID of the contact person linked to the document. | String (20)ContactPersonId | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
CreatedByThe user who created the record. System field. | String (20)CreatedBy | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 17 more | |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 24 more | |
DefaultAttachmentYes/No value marking this as the default attachment. | EnumDocuDefaultAttachmentNoYes (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 46 more | |
DocumentIdUnique GUID that identifies the document. | GuidDocuDocumentId | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 53 more | |
EncyclopediaItemIdID of the knowledge article item linked to the document. | StringsmmEncyclopediaItemId | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
EngChgEngineeringDocumentLink to an engineering document record. | Int64EngChgEngineeringDocumentRecId | No | SysAttachmentSyncEntity | |
EngChgEngineeringReferenceReference code used for engineering. | String (36)EngChgEngineeringReferenceId | No | SysAttachmentSyncEntity | |
InterCompanySkipUpdateOption that sets whether internal, intercompany or both kinds of update are skipped. | EnumInterCompanySkipUpdate (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
IsCashExpensePurpose not clear from the metadata.low confidence | EnumNoYes (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpenseCopilotUnattachedDocumentEntityTrvExpMobileUnattachedDocumentEntityand 4 more | |
isEnabledForVirtualEntitySyncFlag showing whether the row is enabled for synchronisation with a virtual entity. | Enumboolean (enum) | No | SysAttachmentSyncEntity | |
IsJustificationPurpose not clear from the metadata.low confidence | EnumNoYes (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 10 more | |
ModifiedByThe user who last changed the record. System field. | String (20)ModifiedBy | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 1 more | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 1 more | |
NameShort description of the document. | String (60)Description | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 66 more | |
NotesFree-text note about the document. | String (-1)Notes | No | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 62 more | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | TrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntity | |
PartyGlobal address book party linked to the document reference. | Int64RefRecId | No | DirPartyTable.RecId | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | TrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntity | |
RefCompanyIdCompany of the record that the document is attached to. | StringSelectableDataArea | Yes | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 18 more | |
RefRecIdSystem record ID of the record the document is attached to. | Int64RefRecId | Yes | TrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityand 19 more | |
RefTableIdID of the table that holds the record the document is attached to. | IntegerRefTableId | Yes | TrvCopilotAttachedReceiptEntityTrvCopilotAttachedReceiptEntityTrvExpAttachedDocumentEntityand 20 more | |
RestrictionShows whether the document is internal or external. | EnumDocuRestriction (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 53 more | |
smmEMailEntryIDEntry ID of an email item, used by sales and marketing. | String (255)smmEMailEntryID | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
smmEMailStoreIDStore ID of the mailbox where an email item is kept, used by sales and marketing. | String (300)smmEMailStoreID | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
smmTableFlag linked to the sales and marketing table.low confidence | Enumboolean (enum) | No | TrvCopilotAttachedReceiptEntityTrvExpMobileReceiptAttachedToExpenseLineEntityTrvExpMobileReceiptEntityand 2 more | |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | SysAttachmentSyncEntity | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TypeIdDocument type of the reference. | String (20)DocuTypeId | Yes | DocuType.TypeId | TrvExpMobileReceiptEntityBusinessDocumentDocuRefEntityMssLeaveRequestAttachmentEntityand 40 more |
ValueRecIdLink to the document value row that holds the file or URL. | Int64RefRecId | No | DocuValue.RecId | TrvExpAttachedDocumentEntityTrvExpenseCopilotUnattachedDocumentEntityTrvExpMobileAttachedDocumentEntityand 9 more |
Indexes (11)
RefIdxRefCompanyId,RefTableId,RefRecId,createdDateTime,createdByNot unique.
ValueIdxNot unique.
TypeIdxNot unique.
RecIdxPrimary indexUnique.
RefAuthorIdxNot unique.
ModifiedDateTimeIdxNot unique.
RefContactIdxNot unique.
RefBusRelIdxNot unique.
DirPersonIdxNot unique.
DocumentIdIdxNot unique.
RefTabldIdIdxrefTableId,isEnabledForVirtualEntitySyncNot unique.
Relations (7)
Each relation joins DocuRef to another table on the fields shown.
ActualDataArea→DataAreaJoin on
ActualCompanyId = DataArea.id,DataArea.isVirtual = nullMany DocuRef records → zero or one DataArea record
DocuType→DocuTypeJoin on
ActualCompanyId = DocuType.dataAreaId,TypeId = DocuType.TypeIdMany DocuRef records → exactly one DocuType record
DocuValue→DocuValueJoin on
ValueRecId = DocuValue.RecIdMany DocuRef records → zero or one DocuValue record
RefDataArea→DataAreaJoin on
RefCompanyId = DataArea.id,DataArea.isVirtual = nullMany DocuRef records → exactly one DataArea record
DirAddressBookParty→DirAddressBookPartyAllViewJoin on
Party = DirAddressBookPartyAllView.PartyCardinality not set in the metadata.
DirPartyTable_FK→DirPartyTableJoin on
Party = DirPartyTable.RecIdMany DocuRef records → zero or one DirPartyTable record
DirPerson→DirPersonJoin on
Author = DirPerson.RecIdMany 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.
TrvCopilotAttachedReceiptEntity· 25 fields from this tableTrvExpAttachedDocumentEntity· 14 fields from this tableTrvExpenseCopilotUnattachedDocumentEntity· 16 fields from this tableTrvExpMobileAttachedDocumentEntity· 14 fields from this tableTrvExpMobileDocumentEntity· 15 fields from this tableTrvExpMobileReceiptAttachedToExpenseLineEntity· 26 fields from this tableTrvExpMobileReceiptEntity· 28 fields from this tableTrvExpMobileUnattachedDocumentEntity· 16 fields from this tableTrvExpUnattachedDocumentEntity· 15 fields from this tableBusinessDocumentDocuRefEntity· 7 fields from this tableTrvExpenseAgentAttachedDocumentEntity· 16 fields from this tableTrvExpenseAgentUnattachedDocumentEntity· 16 fields from this tableMssLeaveRequestAttachmentEntity· 8 fields from this tableSysAttachmentSyncEntity· 29 fields from this tableTrvExpenseAgentAttachedDocumentContentEntity· 5 fields from this tableTrvExpenseAgentDocumentContentEntity· 5 fields from this tableUnstructuredDataSearchEntity· 9 fields from this tableWorkflowApprovalAttachmentEntity· 3 fields from this tableCustomerAttachmentsV2Entity· 7 fields from this tableEngChgEngineeringChangeOrderProductRouteOperationPropertiesDocumentV2Entity· 1 field from this tableSalesOrderHeaderDocumentAttachmentV2Entity· 7 fields from this tableSalesOrderLineDocumentAttachmentV2Entity· 7 fields from this tableVendorInvoiceDocumentAttachmentV2Entity· 6 fields from this tableCustomerAttachmentsEntity· 7 fields from this tableCustomerFiscalDocTextReferencedProcessEntity· 3 fields from this tableCustomerFiscalDocumentTextEntity· 6 fields from this tableEcoResProductDocumentAttachmentEntity· 5 fields from this tableEcoResReleasedProductDocumentAttachmentEntity· 5 fields from this tableEngChgEngineeringChangeOrderProductDocumentEntity· 1 field from this tableEngChgEngineeringChangeOrderProductRouteOperationPropertiesDocumentEntity· 1 field from this tableEntAssetMaintenanceAssetDocumentAttachmentEntity· 7 fields from this tableEntAssetMaintenanceJobTypeDefaultDocumentAttachmentEntity· 7 fields from this tableEntAssetMaintenanceRequestDocumentAttachmentEntity· 5 fields from this tableEntAssetMaintenanceWorkOrderLineAttachmentEntity· 5 fields from this tableEntAssetMaintenanceWorkOrderTableAttachmentEntity· 5 fields from this tableHcmCandidateToHireAttachmentEntity· 7 fields from this tableHcmPersonScreeningAttachmentsEntity· 7 fields from this tableLeaveRequestAttachmentEntity· 7 fields from this tableProductFiscalDocTextReferenceProcessEntity· 3 fields from this tableProductFiscalDocumentTextEntity· 6 fields from this tablePurchaseOrderHeaderDocumentAttachmentEntity· 7 fields from this tableQMSQualityTestGroupTestAssignmentTestPlanEntity· 6 fields from this tableRentalItemMovementLineDocumentAttachmentEntity· 7 fields from this tableReturnOrderHeaderDocumentAttachmentEntity· 7 fields from this tableReturnOrderLineDocumentAttachmentEntity· 7 fields from this tableSalesOrderHeaderDocumentAttachmentEntity· 7 fields from this tableSalesOrderLineDocumentAttachmentEntity· 7 fields from this tableTrvExpMobileReceiptAttachedToExpenseLineForApprovalEntity· 21 fields from this tableVendorDocumentAttachmentEntity· 7 fields from this tableVendorFiscalDocTextReferencedProcessEntity· 3 fields from this tableVendorFiscalDocumentTextEntity· 6 fields from this tableWHSInboundShipmentOrderMessageDocumentAttachmentEntity· 7 fields from this tableWHSOutboundShipmentOrderMessageDocumentAttachmentEntity· 7 fields from this tablePurchPublishedRequestForQuotationHeaderDocumentAttachmentEntity· 7 fields from this tableEssLeaveRequestAttachmentEntity· 7 fields from this tablePurchaseAgreementLineNoteEntity· 5 fields from this tableSalesAgreementLineNoteEntity· 5 fields from this tableTrvReceiptEntity· 6 fields from this tableVRMPendingVendorInvoiceHeaderAttachmentDetailsEntity· 7 fields from this tableVRMPendingVendorInvoiceLineAttachmentDetailsEntity· 7 fields from this tableVRMPurchaseOrderResponseHeaderAttachmentEntity· 7 fields from this tableVRMPurchaseOrderResponseLineAttachmentEntity· 7 fields from this tableVRMRequestNewCategoryAttachmentEntity· 7 fields from this tableVRMRFQReplyHeaderAttachmentEntity· 7 fields from this tableVRMRFQReplyLineAttachmentEntity· 7 fields from this tableVRMVendorBankAccountAttachmentEntity· 7 fields from this tableVRMVendorCertificationAttachmentEntity· 7 fields from this tableVRMPurchaseOrderHeaderAttachmentEntity· 7 fields from this tableVRMPurchaseOrderLineAttachmentEntity· 7 fields from this tableVRMPurchaseOrderResponseHeaderHistoryAttachmentEntity· 7 fields from this tableVRMPurchaseOrderResponseLineHistoryAttachmentEntity· 7 fields from this tableVRMRFQAmendmentAttachmentEntity· 6 fields from this tableVRMRFQHeaderAttachmentEntity· 7 fields from this tableVRMRFQLineAttachmentEntity· 7 fields from this table
Need help with DocuRef in a report, an integration or a migration? Talk to Dr Dynamics.