Table
RetailSalesDiscountLine
Discounts for sales line
Holds the discounts applied to a sales order line. Each record gives the discount origin (customer, periodic, manual, loyalty or tender) with amounts and percentages. It links to the sales line by lot ID and, for periodic discounts, to the periodic discount offer.
- Table name
RetailSalesDiscountLine- Module
Commerce transactions and orders- Table group
WorksheetLine- Table type
Regular- Data per company
Yes- Configuration key
Retail- Primary index
None- Replacement key
None- Key fields
None- Model
Foundation
Fields (24)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
AmountDiscount amount in cash. | RealDiscAmount | No | None | |
AppliedDiscountLineNumLine number of the applied discount. | RealLineNum | No | None | |
BundleIdID of the bundle that the discount belongs to. | IntegerRetailDiscountBundleId | No | None | |
CalculatedPricingPriorityNumberPricing priority number that was calculated for the discount. | IntegerRetailPricingPriorityNumber | No | None | |
CustomerDiscountTypeType of customer discount, such as line, multiline or total discount. | EnumRetailCustomerDiscountType (enum) | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DealPriceDeal price value for the discount. | RealRetailDealPriceValue | No | None | |
DiscountAmountDiscount amount in cash. | RealDiscAmount | No | None | |
DiscountCodeCode that identifies the discount. | String (60)RetailDiscountCodeId | No | None | |
DiscountOriginTypeWhere the discount comes from, such as customer, periodic, manual, loyalty points or tender. | EnumRetailDiscountOriginType (enum) | No | None | |
ExcludedAmountDiscount amount in cash that is excluded.low confidence | RealDiscAmount | No | None | |
InventTransIdLot ID that points to the sales line. | String (20)TradeInventTransId | No | SalesLine.InventTransId | None |
IsDiscountExcludedYes or No flag showing whether the discount is excluded. | EnumGUPIsDiscountExcludedNoYes (enum) | No | None | |
ManualDiscountTypeKind of manual discount, either an amount or a percentage, on the line or on the total. | EnumRetailManualDiscountType (enum) | No | None | |
OriginalAmountDiscount amount in cash before any change.low confidence | RealDiscAmount | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PercentageDiscount percentage. | RealDiscPct | No | None | |
PeriodicDiscountOfferIdPeriodic discount offer that the discount comes from. | String (20)RetailOfferIdEx3 | No | RetailPeriodicDiscount.OfferId | None |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
RefRecIdRecord ID in the table that this record refers to. | Int64RefRecId | No | None | |
RefTableIdID of the table that this record refers to. | IntegerRefTableId | No | None | |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None |
Indexes (1)
SalesLineIdxNot unique.
Relations (2)
Each relation joins RetailSalesDiscountLine to another table on the fields shown.
RetailPeriodicDiscount→RetailPeriodicDiscountJoin on
PeriodicDiscountOfferId = RetailPeriodicDiscount.OfferIdMany RetailSalesDiscountLine records → zero or one RetailPeriodicDiscount record
SalesLine→SalesLineJoin on
InventTransId = SalesLine.InventTransIdMany RetailSalesDiscountLine records → exactly one SalesLine record
Get this data out
No public entity reads from RetailSalesDiscountLine. Its data is only reachable through the application, a custom entity or a database export.
Need help with RetailSalesDiscountLine in a report, an integration or a migration? Talk to Dr Dynamics.