Skip to content
D365 Reference

CustTable

main

Customer 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

KeyFieldEDTDescriptionTypeLengthFlags
KeyAccountNumCustAccountThe customer account number — the natural keystring20
PartyRecIdRecId of the global-address-book party in DirPartyTable this customer resolves to for its nameint64
DefaultDimensionRecIdRecId of the customer's default financial-dimension value set in DimensionAttributeValueSetint64
CustGroupCustomer group for posting and reportingstring10
InvoiceAccountCustAccountAccount invoices for this customer are billed tostring20
CurrencyCurrencyCodeDefault transaction currency for the customerstring3
PaymTermIdTerms of payment for the customerstring10
PaymModeDefault method of payment for the customerstring10
CashDiscCash discount code for early paymentstring10
CreditMaxCredit limit for the customer in the company currency (0 = no limit set)real
CreditRatingFree-text credit rating note for the customerstring
BlockedWhether and how the customer is blocked (all transactions, invoicing and delivery, never…)enum
DlvModeDefault mode of delivery for the customerstring10
DlvTermDefault terms of delivery for the customerstring10
TaxGroupTaxGroupDefault sales tax group for the customerstring10
VATNumThe customer's tax-exempt / VAT registration numberstring20
SalesGroupDefault commission sales group for the customerstring10
SalesPoolIdDefault sales pool orders for the customer are grouped intostring10
PriceGroupSales price group determining which trade agreements applystring10
LineDiscLine discount group for the customerstring10
MultiLineDiscMultiline discount group for the customerstring10
EndDiscTotal (end) discount group for the customerstring10
MarkupGroupCharges group applied to the customer's ordersstring10
InclTaxWhether prices for the customer include sales taxenum
InvoiceAddressWhich address (invoice account's or order account's) prints on invoicesenum
StatisticsGroupStatistics group for customer reportingstring10

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

  • CustTableDirPartyTableRecId ref · N:1
    ON custtable.party = dirpartytable.recid
  • CustTableDimensionAttributeValueSetRecId ref · N:1
    ON custtable.defaultdimension = dimensionattributevalueset.recid
  • CustTableCustGroupforeign key · N:1
    ON custtable.custgroup = custgroup.custgroup
  • SalesTableCustTableforeign key · N:1
    ON salestable.custaccount = custtable.accountnum
  • CustInvoiceJourCustTableforeign key · N:1
    ON custinvoicejour.invoiceaccount = custtable.accountnum
  • CustInvoiceJourCustTableforeign key · N:1
    ON custinvoicejour.orderaccount = custtable.accountnum
  • CustPackingSlipJourCustTableforeign key · N:1
    ON custpackingslipjour.orderaccount = custtable.accountnum

Data Entities That Expose This Table