---
id: object/table/7004
type: object
title: Table 7004 "Sales Line Discount"
summary: Table 7004 "Sales Line Discount" in Base Application (Microsoft.Sales.Pricing). 11 fields. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28-29.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 56bb84436dbaa12bb700de87d24e5431d6ace5683e9aa965927fc1ea1be4c1e6
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Pricing/SalesLineDiscount.Table.al
    title: src/Layers/W1/BaseApp/Sales/Pricing/SalesLineDiscount.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11562
object_type: table
object_id: 7004
name: Sales Line Discount
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"
  - "26"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 11
  procedures: 0
  events: 0
  subscribers: 0
relations:
  out: 8
  referenced_by: 0
  pages: 2
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 7004 "Sales Line Discount"

> Table 7004 "Sales Line Discount" in Base Application (Microsoft.Sales.Pricing). 11 fields. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28-29.

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

## Properties

| Property | Value |
|---|---|
| Caption | Sales Line Discount |
| 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 one of two values, depending on the value in the Type field. | TableRelation [Table 27 "Item"](../table/27.md), [Table 341 "Item Discount Group"](../table/341.md) (if (Type = const(Item)) Item else if (Type = const("Item Disc. Group")) "Item Discount Group"); NotBlank |
| 2 | Sales Code | Code[20] | Specifies one of the following values, depending on the value in the Sales Type field. | TableRelation [Table 18 "Customer"](../table/18.md), [Table 340 "Customer Discount Group"](../table/340.md), [Table 5071 "Campaign"](../table/5071.md) (if ("Sales Type" = const("Customer Disc. Group")) "Customer Discount Group" else if ("Sales Type" = const(Customer)) Customer else if ("Sales Type" = const(Campaign)) Campaign) |
| 3 | Currency Code | Code[10] | Specifies the currency code of the sales line discount price. | TableRelation [Table 4 "Currency"](../table/4.md) |
| 4 | Starting Date | Date | Specifies the date from which the sales line discount is valid. |  |
| 5 | Line Discount % | Decimal | Specifies the discount percentage to use to calculate the sales line discount. |  |
| 13 | Sales Type | Option | Specifies the sales type of the sales line discount. The sales type defines whether the sales price is for an individual customer, customer discount group, all customers, or for a campaign. | OptionCaption: Customer,Customer Disc. Group,All Customers,Campaign |
| 14 | Minimum Quantity | Decimal | Specifies the minimum quantity that the customer must purchase in order to gain the agreed discount. |  |
| 15 | Ending Date | Date | Specifies the date to which the sales line discount is valid. |  |
| 21 | Type | Enum "Sales Line Discount Type" | Specifies the type of item that the sales discount line is valid for. That is, either an item or an item discount group. | enum [Enum 7021 "Sales Line Discount Type"](../enum/7021.md) |
| 5400 | Unit of Measure Code | Code[10] | Specifies how each unit of the item or resource is measured, such as in pieces or hours. By default, the value in the Base Unit of Measure field on the item or resource card is inserted. | TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md) (if (Type = const(Item)) "Item Unit of Measure".Code where("Item No." = field(Code))) |
| 5700 | Variant Code | Code[10] | Specifies the variant of the item on the line. | TableRelation [Table 5401 "Item Variant"](../table/5401.md) (if (Type = const(Item)) "Item Variant".Code where("Item No." = field(Code))) |

## Keys

- Key1: Type, Code, Sales Type, Sales Code, Starting Date, Currency Code, Variant Code, Unit of Measure Code, Minimum Quantity (clustered)
- Key2: Sales Type, Sales Code, Type, Code, Starting Date, Currency Code, Variant Code, Unit of Measure Code, Minimum Quantity

## Triggers

OnInsert, OnRename

## Relations

- Sales Code: TableRelation [Table 18 "Customer"](../table/18.md) (conditional)
- Code: TableRelation [Table 27 "Item"](../table/27.md) (conditional)
- Sales Code: TableRelation [Table 340 "Customer Discount Group"](../table/340.md) (conditional)
- Code: TableRelation [Table 341 "Item Discount Group"](../table/341.md) (conditional)
- Currency Code: TableRelation [Table 4 "Currency"](../table/4.md)
- Sales Code: TableRelation [Table 5071 "Campaign"](../table/5071.md) (conditional)
- Variant Code: TableRelation [Table 5401 "Item Variant"](../table/5401.md)
- Unit of Measure Code: TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md)

## Pages and codeunits on this table

- [Page 7004 "Sales Line Discounts"](../page/7004.md) (source table)
- [Page 7009 "Get Sales Line Disc."](../page/7009.md) (source table)

## Recent changes

- 2026-09-21 [#11562 [Main] [ALL-E] Sales Line Discount % accepts 5 decimal places through Configuration Package import but rejects manual entry beyond 2 decimal places.Initial Commit](../../changes/bcapps/11562.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26, BC28-29

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: "Sales Line Discount")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
