D365 Reference
CustGroup
groupCustomer group master — one row per posting/reporting group of customers, carrying default payment terms and the settle-period used to derive due dates
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
7 fields · 1 key
7 fields.
| Key | Field | EDT | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | CustGroup | CustGroupId | The customer group code — the natural key CustTable.CustGroup joins on | string | 10 | |
| Name | Descriptive name of the customer group | string | 60 | |||
| PaymTermId | Default terms of payment applied to customers in the group | string | ||||
| ClearingPeriod | Terms of payment used to suggest the settle period for payments from customers in the group | string | ||||
| TaxGroupId | TaxGroup | Default sales tax group for customers in the group | string | 10 | ||
| PriceIncludeSalesTax | Whether prices for the group are entered inclusive of sales tax | enum | ||||
| DefaultDimension | RecId | RecId of the group's default financial-dimension value set in DimensionAttributeValueSet | int64 |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading CustGroup 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
3 parameters not filled: <catalog>, <schema>, <company>
-- ============================================================
-- Table : CustGroup Customer group master — one row per posting/reporting group of customers, carrying default payment terms and the settle-period used to derive due dates
-- Purpose: Column-selected read of CustGroup — auto-generated from field metadata
-- Grain : One row per company (dataareaid) + CustGroup
-- 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.custgroup AS "The customer group code — the natural key CustTable.CustGroup joins on",
c.name AS "Descriptive name of the customer group",
c.paymtermid AS "Default terms of payment applied to customers in the group",
c.clearingperiod AS "Terms of payment used to suggest the settle period for payments from customers in the group",
c.taxgroupid AS "Default sales tax group for customers in the group",
c.priceincludesalestax AS "Whether prices for the group are entered inclusive of sales tax", -- enum: decode c.priceincludesalestax via GlobalOptionsetMetadata join — see quirks guide #enums
c.defaultdimension AS "RecId of the group's default financial-dimension value set in DimensionAttributeValueSet"
FROM <catalog>.<schema>.custgroup c
-- 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>'
ORDER BY c.custgroup;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.custgroup = custgroup.custgroup AND custtable.dataareaid = custgroup.dataareaidON custgroup.defaultdimension = dimensionattributevalueset.recid
Data Entities That Expose This Table
More Sales & Marketing tables
- 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
- CustTableCustomer master — one row per customer account, with the RecId links to its global-address-book party and its default financial dimensions
- 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