D365 Reference
CustTable
mainCustomer master — one row per customer account, with the RecId links to its global-address-book party and its default financial dimensions
Module: Sales & MarketingCompany-partitioned (DataAreaId)
Fields
26 fields · 1 key
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | AccountNum | CustAccount | The customer account number — the natural key | string | 20 | |
| Party | RecId | RecId of the global-address-book party in DirPartyTable this customer resolves to for its name | int64 | |||
| DefaultDimension | RecId | RecId of the customer's default financial-dimension value set in DimensionAttributeValueSet | int64 | |||
| CustGroup | Customer group for posting and reporting | string | 10 | |||
| InvoiceAccount | CustAccount | Account invoices for this customer are billed to | string | 20 | ||
| Currency | CurrencyCode | Default transaction currency for the customer | string | 3 | ||
| PaymTermId | Terms of payment for the customer | string | 10 | |||
| PaymMode | Default method of payment for the customer | string | 10 | |||
| CashDisc | Cash discount code for early payment | string | 10 | |||
| CreditMax | Credit limit for the customer in the company currency (0 = no limit set) | real | ||||
| CreditRating | Free-text credit rating note for the customer | string | ||||
| Blocked | Whether and how the customer is blocked (all transactions, invoicing and delivery, never…) | enum | ||||
| DlvMode | Default mode of delivery for the customer | string | 10 | |||
| DlvTerm | Default terms of delivery for the customer | string | 10 | |||
| TaxGroup | TaxGroup | Default sales tax group for the customer | string | 10 | ||
| VATNum | The customer's tax-exempt / VAT registration number | string | 20 | |||
| SalesGroup | Default commission sales group for the customer | string | 10 | |||
| SalesPoolId | Default sales pool orders for the customer are grouped into | string | 10 | |||
| PriceGroup | Sales price group determining which trade agreements apply | string | 10 | |||
| LineDisc | Line discount group for the customer | string | 10 | |||
| MultiLineDisc | Multiline discount group for the customer | string | 10 | |||
| EndDisc | Total (end) discount group for the customer | string | 10 | |||
| MarkupGroup | Charges group applied to the customer's orders | string | 10 | |||
| InclTax | Whether prices for the customer include sales tax | enum | ||||
| InvoiceAddress | Which address (invoice account's or order account's) prints on invoices | enum | ||||
| StatisticsGroup | Statistics group for customer reporting | string | 10 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading CustTableon Databricks — enums are decoded, 1900-01-01 dates are wrapped to NULL, and the DataAreaId anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.
Query parameters
-- ============================================================
-- Table : CustTable Customer master — one row per customer account, with the RecId links to its global-address-book party and its default financial dimensions
-- Purpose: Column-selected read of CustTable — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + AccountNum
-- Notes : Auto-generated skeleton for Synapse Link / Fabric Link-landed F&O data (lowercase column names). Enums decoded inline where verified; datetimes stored in UTC; 1900-01-01 dates are sentinels mapped to NULL. System/audit columns omitted — see the quirks guide.
-- ============================================================
SELECT
c.accountnum AS "The customer account number — the natural key",
c.party AS "RecId of the global-address-book party in DirPartyTable this customer resolves to for its name",
c.defaultdimension AS "RecId of the customer's default financial-dimension value set in DimensionAttributeValueSet",
c.custgroup AS "Customer group for posting and reporting",
c.invoiceaccount AS "Account invoices for this customer are billed to",
c.currency AS "Default transaction currency for the customer",
c.paymtermid AS "Terms of payment for the customer",
c.paymmode AS "Default method of payment for the customer",
c.cashdisc AS "Cash discount code for early payment",
c.creditmax AS "Credit limit for the customer in the company currency (0 = no limit set)",
c.creditrating AS "Free-text credit rating note for the customer",
c.blocked AS "Whether and how the customer is blocked (all transactions, invoicing and delivery, never…)", -- enum: decode c.blocked via GlobalOptionsetMetadata join — see quirks guide #enums
c.dlvmode AS "Default mode of delivery for the customer",
c.dlvterm AS "Default terms of delivery for the customer",
c.taxgroup AS "Default sales tax group for the customer",
c.vatnum AS "The customer's tax-exempt / VAT registration number",
c.salesgroup AS "Default commission sales group for the customer",
c.salespoolid AS "Default sales pool orders for the customer are grouped into",
c.pricegroup AS "Sales price group determining which trade agreements apply",
c.linedisc AS "Line discount group for the customer",
c.multilinedisc AS "Multiline discount group for the customer",
c.enddisc AS "Total (end) discount group for the customer",
c.markupgroup AS "Charges group applied to the customer's orders",
c.incltax AS "Whether prices for the customer include sales tax", -- enum: decode c.incltax via GlobalOptionsetMetadata join — see quirks guide #enums
c.invoiceaddress AS "Which address (invoice account's or order account's) prints on invoices", -- enum: decode c.invoiceaddress via GlobalOptionsetMetadata join — see quirks guide #enums
c.statisticsgroup AS "Statistics group for customer reporting"
FROM <catalog>.<schema>.custtable c
-- Resolve DirPartyTable (via Party): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.dirpartytable dir ON dir.recid = c.party
-- Resolve DimensionAttributeValueSet (via DefaultDimension): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.dimensionattributevalueset dim ON dim.recid = c.defaultdimension
WHERE
c.dataareaid = '<company>'
-- AND c.accountnum = '<CustAccount>'
ORDER BY c.accountnum;4 parameters not filled: <catalog>, <schema>, <company>, <CustAccount>
Relationships
1-hop neighbors — click a table to navigate there. RecId and InventDim edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
ON custtable.party = dirpartytable.recidON custtable.defaultdimension = dimensionattributevalueset.recidON custtable.custgroup = custgroup.custgroupON salestable.custaccount = custtable.accountnumON custinvoicejour.invoiceaccount = custtable.accountnumON custinvoicejour.orderaccount = custtable.accountnumON custpackingslipjour.orderaccount = custtable.accountnum