---
id: object/table/340
type: object
title: Table 340 "Customer Discount Group"
summary: Table 340 "Customer Discount Group" in Base Application (Microsoft.Sales.Pricing). 2 fields, 1 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC27-28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 020c679f17537a9dc13a40acecc072779f2cb5f901743fe02ea5cba83397eb09
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Pricing/CustomerDiscountGroup.Table.al
    title: src/Layers/W1/BaseApp/Sales/Pricing/CustomerDiscountGroup.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/sales-how-register-new-customers
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/sales
    - topic/business-central/business-functionality/set-up-business-central/set-up-sales
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 340
name: Customer Discount Group
namespace: Microsoft.Sales.Pricing
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 2
  procedures: 1
  events: 0
  subscribers: 0
relations:
  out: 1
  referenced_by: 33
  pages: 1
  extended_by: 0
  event_subscribers: 3
  calls: 0
  called_by: 0
  implements: 0
---

# Table 340 "Customer Discount Group"

> Table 340 "Customer Discount Group" in Base Application (Microsoft.Sales.Pricing). 2 fields, 1 public procedures. Present since at least BC23, still in BC30, changed in BC24, BC27-28.

Base Application · Microsoft.Sales.Pricing · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Pricing/CustomerDiscountGroup.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 512 "Customer Disc. Groups"](../page/512.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Customer Discount Group |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Code | Code[20] | Specifies a code for the customer discount group. | NotBlank |
| 2 | Description | Text[100] | Specifies a description for the customer discount group. |  |

## Keys

- Key1: Code (clustered)

## Trigger event subscribers

- OnAfterDeleteEvent: [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterDeleteCustomerDiscountGroup, [Codeunit 7019 "Price Helper - V15"](../codeunit/7019.md) AfterDeleteCustomerDiscountGroup
- OnAfterRenameEvent: [Codeunit 7006 "Price Helper - V16"](../codeunit/7006.md) AfterRenameCustomerDiscGroup

## Procedures

- `ToPriceSource(var PriceSource: Record "Price Source")`: Converts this customer discount group to a price source record.

## Triggers

OnDelete

## Relations

- lookup page [Page 512 "Customer Disc. Groups"](../page/512.md)

## Referenced by

33 fields in 33 objects relate to this table (TableRelation or CalcFormula).

- [Table 110 "Sales Shipment Header"](../table/110.md): Customer Disc. Group
- [Table 111 "Sales Shipment Line"](../table/111.md): Customer Disc. Group
- [Table 112 "Sales Invoice Header"](../table/112.md): Customer Disc. Group
- [Table 113 "Sales Invoice Line"](../table/113.md): Customer Disc. Group
- [Table 114 "Sales Cr.Memo Header"](../table/114.md): Customer Disc. Group
- [Table 115 "Sales Cr.Memo Line"](../table/115.md): Customer Disc. Group
- [Table 1304 "Sales Price and Line Disc Buff"](../table/1304.md): Sales Code
- [Table 1381 "Customer Templ."](../table/1381.md): Customer Disc. Group
- [Table 167 "Job"](../table/167.md): Customer Disc. Group
- [Table 18 "Customer"](../table/18.md): Customer Disc. Group
- [Table 30102 "Shpfy Shop"](../table/30102.md): Customer Discount Group
- [Table 30152 "Shpfy Catalog"](../table/30152.md): Customer Discount Group
- [Table 36 "Sales Header"](../table/36.md): Customer Disc. Group
- [Table 37 "Sales Line"](../table/37.md): Customer Disc. Group
- [Table 5107 "Sales Header Archive"](../table/5107.md): Cust./Item Disc. Gr.
- [Table 5108 "Sales Line Archive"](../table/5108.md): Customer Disc. Group
- [Table 5135 "Job Archive"](../table/5135.md): Customer Disc. Group
- [Table 5900 "Service Header"](../table/5900.md): Customer Disc. Group
- [Table 5902 "Service Line"](../table/5902.md): Customer Disc. Group
- [Table 5990 "Service Shipment Header"](../table/5990.md): Customer Disc. Group
- [Table 5991 "Service Shipment Line"](../table/5991.md): Customer Disc. Group
- [Table 5992 "Service Invoice Header"](../table/5992.md): Customer Disc. Group
- [Table 5993 "Service Invoice Line"](../table/5993.md): Customer Disc. Group
- [Table 5994 "Service Cr.Memo Header"](../table/5994.md): Customer Disc. Group
- [Table 5995 "Service Cr.Memo Line"](../table/5995.md): Customer Disc. Group
- [Table 6010 "Service Header Archive"](../table/6010.md): Customer Disc. Group
- [Table 6012 "Service Line Archive"](../table/6012.md): Customer Disc. Group
- [Table 6660 "Return Receipt Header"](../table/6660.md): Customer Disc. Group
- [Table 6661 "Return Receipt Line"](../table/6661.md): Customer Disc. Group
- [Table 7000 "Price List Header"](../table/7000.md): Assign-to No.
- [Table 7001 "Price List Line"](../table/7001.md): Assign-to No.
- [Table 7004 "Sales Line Discount"](../table/7004.md): Sales Code
- [Table 7022 "Price Worksheet Line"](../table/7022.md): Assign-to No.

## Pages and codeunits on this table

- [Page 512 "Customer Disc. Groups"](../page/512.md) (source table)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC27-28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "Customer Discount Group")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
