Table
MCRPriceHistory
Price history
Keeps a history of prices and discounts from trade agreements, with a version number for each. Each record holds the party, item, unit, currency, date range, amounts and discount percentages. It is keyed by a reference record, a reference table and a version.
- Table name
MCRPriceHistory- Module
Sales and marketing- Table group
Transaction- Table type
Regular- Data per company
Yes- Configuration key
TradeAgreements- Primary index
RefRecIdIdx- Replacement key
RefRecIdIdx- Key fields
RefRecId, RefTableId, Version- Model
Foundation
Fields (38)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
RefRecIdSystem record ID of the related inventory module parameters record. | Int64MCRRelatedTableRefRecId | Yes | None | |
RefTableIdID of the table that the reference points to, which is the inventory module parameters table. | IntegerRefTableId | Yes | None | |
VersionVersion number of the history record. | IntegerVersion | Yes | None | |
AccountCodeSays whether the record applies to one customer, a group or all. | EnumPriceDiscPartyCodePriceDiscPartyCodeType (enum) | No | None | |
AccountRelationCustomer or group that the price or discount applies to. | String (20)PriceDiscAccountRelation | No | CustTable.AccountNum | None |
AllocateMarkupShows whether the charges are included in the unit price (Yes or No). | EnumNoYes (enum) | No | None | |
AmountAmount of the price or discount. | RealPriceDiscAmount | No | None | |
CalculatedPricingPriorityNumberPriority number of the pricing, shown only for orders processed with unified pricing management. | IntegerRetailPricingPriorityNumber | No | None | |
CurrencyCurrency of the amount. | String (3)CurrencyCode | No | Currency.CurrencyCode | None |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DisplayedSalesLineUnitPriceUnit price shown on the sales line. | RealMCRPriceHistoryUnitPrice | No | None | |
FromDateDate from which the price or discount applies. | DateFromDate | No | None | |
InventDimIdInventory dimensions that the price or discount applies to. | String (20)InventDimId | No | InventDim.inventDimId | None |
ItemCodeSays whether the record applies to one item, an item group or all items. | EnumPriceDiscProductCodePriceDiscProductCodeType (enum) | No | None | |
ItemRelationItem or item group that the price or discount applies to. | String (20)PriceDiscItemRelation | No | InventItemGroup.ItemGroupIdInventTable.ItemId | None |
JournalNumNumber of the price or discount journal linked to the record. | String (20)PriceDiscJournalNum | No | None | |
MarkupCharges added to the price. | RealPriceMarkup | No | None | |
MerchandisingEventIDMerchandising event linked to the record. | StringMCRMerchandisingEventID | No | TAMMerchandisingEvent.MerchandisingEventID | None |
ModuleModule the record belongs to: inventory, customer or vendor. | EnumPriceDiscModuleModuleInventCustVend (enum) | No | None | |
ModuleTypeType of order the record relates to: inventory, purchase order or sales order. | EnumModuleInventPurchSales (enum) | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
Percent1First discount percentage. | RealDiscPct | No | None | |
Percent2Second discount percentage. | RealDiscPct | No | None | |
PriceComponentCodeCode of the margin component for the price. | String (60)Name | No | GUPPriceComponentCode.Name | None |
PriceDiscGroupTypeType of price discount group: standard, source code or trade allowance. | EnumMCRPriceDiscGroupType (enum) | No | None | |
PriceHistoryPotentialTypePossible type of price or discount, such as price, line discount or end of a range. | EnumMCRPriceHistoryPotentialType (enum) | No | None | |
PriceHistoryTypeType of price or discount, such as item price, line discount or total discount. | EnumMCRPriceHistoryType (enum) | No | None | |
PriceHistoryUnitPriceUnit price stored in the history. | RealMCRPriceHistoryUnitPrice | No | None | |
PriceQtyQuantity that the price applies to. | RealPriceQty | No | None | |
PriceUnitNumber of units that the price covers. | RealPriceUnit | No | None | |
QuantityAmountStart of the quantity or amount range. | RealAmountQty | No | None | |
QuantityAmountToEnd of the quantity or amount range. | RealAmountQuantityTo | No | 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 | |
RelationType of price or discount relation, for purchase or sales, such as price, line discount or total discount. | EnumPriceType (enum) | 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 | |
UnitIdUnit of measure for the price. | StringUnitOfMeasureSymbol | No | UnitOfMeasure.Symbol | None |
Indexes (2)
RefRecIdIdxPrimary indexReplacement keyUnique, alternate key.
MerchEventIDNot unique.
Relations (14)
Each relation joins MCRPriceHistory to another table on the fields shown.
Currency→CurrencyJoin on
Currency = Currency.CurrencyCodeMany MCRPriceHistory records → zero or one Currency record
CustTable→CustTableJoin on
AccountRelation = CustTable.AccountNum,AccountCode = PriceDiscPartyCodeType::TableMany MCRPriceHistory records → zero or one CustTable record
InventDim→InventDimJoin on
InventDimId = InventDim.inventDimIdMany MCRPriceHistory records → zero or one InventDim record
InventItemGroup→InventItemGroupJoin on
ItemRelation = InventItemGroup.ItemGroupId,ItemCode = PriceDiscProductCodeType::GroupIdMany MCRPriceHistory records → zero or one InventItemGroup record
InventTable→InventTableJoin on
ItemRelation = InventTable.ItemId,ItemCode = PriceDiscProductCodeType::TableMany MCRPriceHistory records → zero or one InventTable record
InventTableModule→InventTableModuleJoin on
RefTableId = InventTableModule.TableId,RefRecId = InventTableModule.RecIdMany MCRPriceHistory records → zero or one InventTableModule record
PriceDiscTable→PriceDiscTableJoin on
RefTableId = PriceDiscTable.TableId,RefRecId = PriceDiscTable.RecIdMany MCRPriceHistory records → zero or one PriceDiscTable record
TAMMerchandisingEvent→TAMMerchandisingEventJoin on
MerchandisingEventID = TAMMerchandisingEvent.MerchandisingEventIDZero or one MCRPriceHistory record → zero or one TAMMerchandisingEvent record
UnitOfMeasure→UnitOfMeasureJoin on
UnitId = UnitOfMeasure.SymbolMany MCRPriceHistory records → zero or one UnitOfMeasure record
CustEndGroup→PriceDiscGroupJoin on
PriceDiscGroup.Type = PriceGroupType::EndDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::Cust,relation = PriceType::EndDiscSales,AccountCode = PriceDiscPartyCodeType::GroupId,AccountRelation = PriceDiscGroup.GroupIdMany MCRPriceHistory records → zero or one PriceDiscGroup record
CustLineGroup→PriceDiscGroupJoin on
PriceDiscGroup.Type = PriceGroupType::LineDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::Cust,relation = PriceType::LineDiscSales,AccountCode = PriceDiscPartyCodeType::GroupId,AccountRelation = PriceDiscGroup.GroupIdMany MCRPriceHistory records → zero or one PriceDiscGroup record
CustMultiGroup→PriceDiscGroupJoin on
PriceDiscGroup.Type = PriceGroupType::MultiLineDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::Cust,relation = PriceType::MultiLineDiscSales,AccountCode = PriceDiscPartyCodeType::GroupId,AccountRelation = PriceDiscGroup.GroupIdMany MCRPriceHistory records → zero or one PriceDiscGroup record
CustPriceGroup→PriceDiscGroupJoin on
PriceDiscGroup.Type = PriceGroupType::PriceGroup,PriceDiscGroup.Module = ModuleInventCustVend::Cust,relation = PriceType::PriceSales,AccountCode = PriceDiscPartyCodeType::GroupId,AccountRelation = PriceDiscGroup.GroupIdMany MCRPriceHistory records → zero or one PriceDiscGroup record
PriceComponentCode→GUPPriceComponentCodeJoin on
PriceComponentCode = GUPPriceComponentCode.NameZero or one MCRPriceHistory record → exactly one GUPPriceComponentCode record
Get this data out
No public entity reads from MCRPriceHistory. Its data is only reachable through the application, a custom entity or a database export.
Need help with MCRPriceHistory in a report, an integration or a migration? Talk to Dr Dynamics.