Document Attachment

Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/1173

Table Type: Company

Table Name: Document Attachment
Database Table Name: CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972

Table Number: 1173

Due to how Dynamics BC tables and columns are named, square brackets need to be wrapped around the table name and column names. Below are example queries showing how Document Attachment can be queried.

Show/hide an example select of all columns

SELECT
   *
FROM
   [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972]

Show/hide an example select of all columns by name

SELECT
   [ID]
   ,[Table ID]
   ,[No_]
   ,[Attached Date]
   ,[File Name]
   ,[File Type]
   ,[File Extension]
   ,[Document Reference ID]
   ,[Attached By]
   ,[Document Flow Purchase]
   ,[Document Flow Sales]
   ,[Document Type]
   ,[Line No_]
   ,[VAT Report Config_ Code]
   ,[$systemId]
   ,[$systemCreatedAt]
   ,[$systemCreatedBy]
   ,[$systemModifiedAt]
   ,[$systemModifiedBy]
FROM
   [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972]

Show/hide an example select of all columns including those from all joined tables

SELECT
   *
FROM
   [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Document Attachment]
LEFT JOIN
   [CRONUS UK Ltd_$Data Exch_ Mapping$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Data Exch. Mapping]
      ON
         [Document Attachment].[Table ID] = [Data Exch. Mapping].[Table ID]
LEFT JOIN
   [CRONUS UK Ltd_$Sales Header Archive$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Sales Header Archive]
      ON
         [Document Attachment].[Document Type] = [Sales Header Archive].[Document Type]
      AND
         [Document Attachment].[Document No_] = [Sales Header Archive].[No_]
LEFT JOIN
   [CRONUS UK Ltd_$Sales Header$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Sales Header]
      ON
         [Document Attachment].[Document Type] = [Sales Header].[Document Type]
      AND
         [Document Attachment].[Document No_] = [Sales Header].[No_]
LEFT JOIN
   [User] AS [User]
      ON
         [Document Attachment].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
   [User] AS [User]
      ON
         [Document Attachment].[SystemModifiedBy] = [User].[User Security ID]

Show/hide columns in Document Attachment table

Field No.Field NameField CaptionClassTypeLengthSQL Column NameSQL DataType
1ID SearchIDNormalInteger4IDint
2Table ID Primary Key SearchTable IDNormalInteger4Table IDint
Key to join to the Data Exch. Mapping table.

Show/hide example query

SELECT
	       [Document Attachment].[Table ID]
	       ,[Data Exch. Mapping].[Table ID]
	FROM
	       [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Document Attachment]
	LEFT JOIN
	       [CRONUS UK Ltd_$Data Exch_ Mapping$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Data Exch. Mapping]
	              ON
	                     [Document Attachment].[Table ID] = [Data Exch. Mapping].[Table ID]
3No. Primary Key SearchNo.NormalCode20No_nvarchar(40)
4Attached Date Primary Key SearchAttached DateNormalDateTime8Attached Datedatetime
5File Name SearchAttachmentNormalText250File Namenvarchar(500)
6File Type SearchFile TypeNormalOption4File Typeint
Available options are:
  • ” “
  • “Image”
  • “PDF”
  • “Word”
  • “Excel”
  • “PowerPoint”
  • “Email”
  • “XML”
  • “Other”
7File Extension SearchFile ExtensionNormalText30File Extensionnvarchar(60)
8Document Reference ID SearchDocument Reference IDNormalMedia16Document Reference IDuniqueidentifier
9Attached By SearchAttached ByNormalGUID16Attached Byuniqueidentifier
10User SearchUserFlowFieldCode50
11Document Flow Purchase SearchFlow to Purch. TrxNormalBoolean4Document Flow Purchasetinyint
12Document Flow Sales SearchFlow to Sales TrxNormalBoolean4Document Flow Salestinyint
13Document Type SearchDocument TypeNormalOption4Document Typeint
Available options are:
  • “Quote”
  • “Order”
  • “Invoice”
  • “Credit Memo”
  • “Blanket Order”
  • “Return Order”
  • “VAT Return Submission”
  • “VAT Return Response”
14Line No. Primary Key SearchLine No.NormalInteger4Line No_int
15VAT Report Config. Code Primary Key SearchTax Report Config. CodeNormalOption4VAT Report Config_ Codeint
Key to join to the VAT Reports Configuration table.

Show/hide example query

SELECT
	       [Document Attachment].[VAT Report Config_ Code]
	       ,[VAT Reports Configuration].[VAT Report Type]
	FROM
	       [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Document Attachment]
	LEFT JOIN
	       [CRONUS UK Ltd_$VAT Reports Configuration$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [VAT Reports Configuration]
	              ON
	                     [Document Attachment].[VAT Report Config_ Code] = [VAT Reports Configuration].[VAT Report Type]
Available options are:
  • “EC Sales List”
  • “VAT Return”
  • “Intrastat Report”
2000000000$systemId SearchSystem IDNormalGUID16$systemIduniqueidentifier
2000000001SystemCreatedAt SearchCreated AtNormalDateTime8$systemCreatedAtdatetime
2000000002SystemCreatedBy SearchCreated ByNormalGUID16$systemCreatedByuniqueidentifier
Key to join to the User table.

Show/hide example query

SELECT
	       [Document Attachment].[$systemCreatedBy]
	       ,[User].[User Security ID]
	FROM
	       [CRONUS UK Ltd_$Document Attachment$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Document Attachment]
	LEFT JOIN
	       [User] AS [User]
	              ON
	                     [Document Attachment].[$systemCreatedBy] = [User].[User Security ID]
2000000003SystemModifiedAt SearchModified AtNormalDateTime8$systemModifiedAtdatetime
2000000004SystemModifiedBy SearchModified ByNormalGUID16$systemModifiedByuniqueidentifier

Show/hide tables related from Document Attachment table

Leave a Reply

Your email address will not be published. Required fields are marked *