O365 Sales Document

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

Table Type: Company

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

Table Number: 2103

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 O365 Sales Document can be queried.

Show/hide an example select of all columns

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

Show/hide an example select of all columns by name

SELECT
   [Document Type]
   ,[Sell-to Customer No_]
   ,[No_]
   ,[Due Date]
   ,[Currency Code]
   ,[Sell-to Customer Name]
   ,[Sell-to Contact]
   ,[Document Date]
   ,[IsTest]
   ,[Posted]
   ,[Currency Symbol]
   ,[Document Status]
   ,[Sales Amount]
   ,[Outstanding Amount]
   ,[Total Invoiced Amount]
   ,[Outstanding Status]
   ,[Document Icon]
   ,[Payment Method]
   ,[Display No_]
   ,[$systemId]
   ,[$systemCreatedAt]
   ,[$systemCreatedBy]
   ,[$systemModifiedAt]
   ,[$systemModifiedBy]
FROM
   [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972]

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

SELECT
   *
FROM
   [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
   [CRONUS UK Ltd_$Sales Header$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Sales Header]
      ON
         [O365 Sales Document].[Document Type] = [Sales Header].[Document Type]
      AND
         [O365 Sales Document].[Document No_] = [Sales Header].[No_]
LEFT JOIN
   [CRONUS UK Ltd_$Sales Header Archive$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Sales Header Archive]
      ON
         [O365 Sales Document].[Document Type] = [Sales Header Archive].[Document Type]
      AND
         [O365 Sales Document].[Document No_] = [Sales Header Archive].[No_]
LEFT JOIN
   [CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency]
      ON
         [O365 Sales Document].[Currency Code] = [Currency].[Code]
LEFT JOIN
   [CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
      ON
         [O365 Sales Document].[Sell-to Customer Name] = [Customer].[Name]
LEFT JOIN
   [User] AS [User]
      ON
         [O365 Sales Document].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
   [User] AS [User]
      ON
         [O365 Sales Document].[SystemModifiedBy] = [User].[User Security ID]

Show/hide columns in O365 Sales Document table

Field No.Field NameField CaptionClassTypeLengthSQL Column NameSQL DataType
1Document Type Primary Key SearchDocument TypeNormalOption4Document Typeint
Available options are:
  • “Quote”
  • “Order”
  • “Invoice”
  • “Credit Memo”
  • “Blanket Order”
  • “Return Order”
2Sell-to Customer No. SearchSell-to Customer No.NormalCode20Sell-to Customer No_nvarchar(40)
Key to join to the Customer table.

Show/hide example query

SELECT
       [O365 Sales Document].[Sell-to Customer No_]
       ,[Customer].[No_]
FROM
       [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
       [CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
              ON
                     [O365 Sales Document].[Sell-to Customer No_] = [Customer].[No_]
3No. Primary Key SearchNo.NormalCode20No_nvarchar(40)
24Due Date SearchDue DateNormalDate4Due Datedatetime
32Currency Code SearchCurrency CodeNormalCode10Currency Codenvarchar(20)
Key to join to the Currency table.

Show/hide example query

SELECT
       [O365 Sales Document].[Currency Code]
       ,[Currency].[Code]
FROM
       [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
       [CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency]
              ON
                     [O365 Sales Document].[Currency Code] = [Currency].[Code]
79Sell-to Customer Name SearchSell-to Customer NameNormalText100Sell-to Customer Namenvarchar(200)
Key to join to the Customer table.

Show/hide example query

SELECT
       [O365 Sales Document].[Sell-to Customer Name]
       ,[Customer].[Name]
FROM
       [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
       [CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
              ON
                     [O365 Sales Document].[Sell-to Customer Name] = [Customer].[Name]
84Sell-to Contact SearchSell-to ContactNormalText100Sell-to Contactnvarchar(200)
99Document Date SearchDocument DateNormalDate4Document Datedatetime
166Last Email Sent Time SearchLast Email Sent TimeFlowFieldDateTime8
167Last Email Sent Status SearchLast Email Sent StatusFlowFieldOption4
168Sent as Email SearchSent as EmailFlowFieldBoolean4
169Last Email Notif Cleared SearchLast Email Notif ClearedFlowFieldBoolean4
170IsTest SearchIsTestNormalBoolean4IsTesttinyint
2100Posted Primary Key SearchPostedNormalBoolean4Postedtinyint
2101Canceled SearchCanceledFlowFieldBoolean4
2102Currency Symbol SearchCurrency SymbolNormalText10Currency Symbolnvarchar(20)
2103Document Status SearchDocument StatusNormalOption4Document Statusint
Available options are:
  • “Quote”
  • “Draft Invoice”
  • “Unpaid Invoice”
  • “Canceled Invoice”
  • “Paid Invoice”
  • “Overdue Invoice”
2104Sales Amount SearchSales AmountNormalDecimal12Sales Amountdecimal(38,38)
2105Outstanding Amount SearchOutstanding AmountNormalDecimal12Outstanding Amountdecimal(38,38)
2106Total Invoiced Amount SearchTotal Invoiced AmountNormalText250Total Invoiced Amountnvarchar(500)
2107Outstanding Status SearchOutstanding StatusNormalText250Outstanding Statusnvarchar(500)
2108Document Icon SearchDocument IconNormalMediaSet16Document Iconuniqueidentifier
2109Payment Method SearchPayment MethodNormalCode10Payment Methodnvarchar(20)
2110Display No. SearchDisplay No.NormalText20Display No_nvarchar(40)
2111Quote Valid Until Date SearchQuote Valid Until DateFlowFieldDate4
2112Quote Accepted SearchQuote AcceptedFlowFieldBoolean4
2113Quote Sent to Customer SearchQuote Sent to CustomerFlowFieldDateTime8
2114Quote Accepted Date SearchQuote Accepted DateFlowFieldDate4
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
       [O365 Sales Document].[$systemCreatedBy]
       ,[User].[User Security ID]
FROM
       [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
       [User] AS [User]
              ON
                     [O365 Sales Document].[$systemCreatedBy] = [User].[User Security ID]
2000000003SystemModifiedAt SearchModified AtNormalDateTime8$systemModifiedAtdatetime
2000000004SystemModifiedBy SearchModified ByNormalGUID16$systemModifiedByuniqueidentifier
Key to join to the User table.

Show/hide example query

SELECT
       [O365 Sales Document].[$systemModifiedBy]
       ,[User].[User Security ID]
FROM
       [CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
       [User] AS [User]
              ON
                     [O365 Sales Document].[$systemModifiedBy] = [User].[User Security ID]

Show/hide tables related from O365 Sales Document table

Leave a Reply

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