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
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 Name | Field Caption | Class | Type | Length | SQL Column Name | SQL DataType |
---|---|---|---|---|---|---|---|
1 | ID | ID | Normal | Integer | 4 | ID | int |
2 | Table ID | Table ID | Normal | Integer | 4 | Table ID | int |
Key to join to the Data Exch. Mapping table.Show/hide example querySELECT [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] | |||||||
3 | No. | No. | Normal | Code | 20 | No_ | nvarchar(40) |
4 | Attached Date | Attached Date | Normal | DateTime | 8 | Attached Date | datetime |
5 | File Name | Attachment | Normal | Text | 250 | File Name | nvarchar(500) |
6 | File Type | File Type | Normal | Option | 4 | File Type | int |
Available options are:
| |||||||
7 | File Extension | File Extension | Normal | Text | 30 | File Extension | nvarchar(60) |
8 | Document Reference ID | Document Reference ID | Normal | Media | 16 | Document Reference ID | uniqueidentifier |
9 | Attached By | Attached By | Normal | GUID | 16 | Attached By | uniqueidentifier |
10 | User | User | FlowField | Code | 50 | ||
11 | Document Flow Purchase | Flow to Purch. Trx | Normal | Boolean | 4 | Document Flow Purchase | tinyint |
12 | Document Flow Sales | Flow to Sales Trx | Normal | Boolean | 4 | Document Flow Sales | tinyint |
13 | Document Type | Document Type | Normal | Option | 4 | Document Type | int |
Available options are:
| |||||||
14 | Line No. | Line No. | Normal | Integer | 4 | Line No_ | int |
15 | VAT Report Config. Code | Tax Report Config. Code | Normal | Option | 4 | VAT Report Config_ Code | int |
Key to join to the VAT Reports Configuration table.Show/hide example querySELECT [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]
| |||||||
2000000000 | $systemId | System ID | Normal | GUID | 16 | $systemId | uniqueidentifier |
2000000001 | SystemCreatedAt | Created At | Normal | DateTime | 8 | $systemCreatedAt | datetime |
2000000002 | SystemCreatedBy | Created By | Normal | GUID | 16 | $systemCreatedBy | uniqueidentifier |
Key to join to the User table.Show/hide example querySELECT [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] | |||||||
2000000003 | SystemModifiedAt | Modified At | Normal | DateTime | 8 | $systemModifiedAt | datetime |
2000000004 | SystemModifiedBy | Modified By | Normal | GUID | 16 | $systemModifiedBy | uniqueidentifier |