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)
Fields
7 fields · 1 key
| 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 CustGroupon 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 : 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;3 parameters not filled: <catalog>, <schema>, <company>
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.custgroup = custgroup.custgroupON custgroup.defaultdimension = dimensionattributevalueset.recid