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)
What the badges mean
- main
- Table group: how F&O categorizes the table's role — main entity, group/header, transaction, worksheet header, worksheet line, reference, parameter, or framework.
- Shared across companies
- The table carries no
DataAreaId— rows aren’t partitioned per company, so a query never needs (and can’t use) a company filter here (see the quirks guide). - Date-effective
- The table carries a
ValidFrom/ValidToeffectivity window — a join without a date filter multiplies every key by its history (see the quirks guide).
In field listings, K marks a key field.
Fields
26 fields · 1 key
26 fields.
| 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 CustTable on 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
4 parameters not filled: <catalog>, <schema>, <company>, <CustAccount>
-- ============================================================
-- 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;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. 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.custgroup AND custtable.dataareaid = custgroup.dataareaidON salestable.custaccount = custtable.accountnum AND salestable.dataareaid = custtable.dataareaidON custinvoicejour.invoiceaccount = custtable.accountnum AND custinvoicejour.dataareaid = custtable.dataareaidON custinvoicejour.orderaccount = custtable.accountnum AND custinvoicejour.dataareaid = custtable.dataareaidON custpackingslipjour.orderaccount = custtable.accountnum AND custpackingslipjour.dataareaid = custtable.dataareaidON custtrans.accountnum = custtable.accountnum AND custtrans.dataareaid = custtable.dataareaidON custtrans.orderaccount = custtable.accountnum AND custtrans.dataareaid = custtable.dataareaid
Data Entities That Expose This Table
More Sales & Marketing tables
- SalesLineSales order line — one row per order line; the core sell-side transaction, joined to its header by SalesId
- SalesTableSales order header — one row per order carrying customer, status, site, and requested dates
- CustGroupCustomer group master — one row per posting/reporting group of customers, carrying default payment terms and the settle-period used to derive due dates
- CustInvoiceJourPosted customer invoice header — one row per invoice issued from a sales order (or free-text posting), with totals, currency, due date, and the ledger voucher it posted under
- CustInvoiceTransPosted customer invoice line — one row per invoiced line with item, quantity, price, and amounts; the revenue-by-item grain of order-to-cash analytics
- CustPackingSlipJourPosted packing-slip header — one row per shipment document posted against a sales order, with delivery date, ship-to address reference, and carrier details