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 descriptionType / EDT / enumMandatoryReferencesIn public entities
RefRecIdSystem record ID of the related inventory module parameters record.Int64
MCRRelatedTableRefRecId
YesNone
RefTableIdID of the table that the reference points to, which is the inventory module parameters table.Integer
RefTableId
YesNone
VersionVersion number of the history record.Integer
Version
YesNone
AccountCodeSays whether the record applies to one customer, a group or all.Enum
PriceDiscPartyCode
PriceDiscPartyCodeType (enum)
NoNone
AccountRelationCustomer or group that the price or discount applies to.String (20)
PriceDiscAccountRelation
NoCustTable.AccountNumNone
AllocateMarkupShows whether the charges are included in the unit price (Yes or No).Enum
NoYes (enum)
NoNone
AmountAmount of the price or discount.Real
PriceDiscAmount
NoNone
CalculatedPricingPriorityNumberPriority number of the pricing, shown only for orders processed with unified pricing management.Integer
RetailPricingPriorityNumber
NoNone
CurrencyCurrency of the amount.String (3)
CurrencyCode
NoCurrency.CurrencyCodeNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DisplayedSalesLineUnitPriceUnit price shown on the sales line.Real
MCRPriceHistoryUnitPrice
NoNone
FromDateDate from which the price or discount applies.Date
FromDate
NoNone
InventDimIdInventory dimensions that the price or discount applies to.String (20)
InventDimId
NoInventDim.inventDimIdNone
ItemCodeSays whether the record applies to one item, an item group or all items.Enum
PriceDiscProductCode
PriceDiscProductCodeType (enum)
NoNone
ItemRelationItem or item group that the price or discount applies to.String (20)
PriceDiscItemRelation
NoInventItemGroup.ItemGroupIdInventTable.ItemIdNone
JournalNumNumber of the price or discount journal linked to the record.String (20)
PriceDiscJournalNum
NoNone
MarkupCharges added to the price.Real
PriceMarkup
NoNone
MerchandisingEventIDMerchandising event linked to the record.String
MCRMerchandisingEventID
NoTAMMerchandisingEvent.MerchandisingEventIDNone
ModuleModule the record belongs to: inventory, customer or vendor.Enum
PriceDiscModule
ModuleInventCustVend (enum)
NoNone
ModuleTypeType of order the record relates to: inventory, purchase order or sales order.Enum
ModuleInventPurchSales (enum)
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
Percent1First discount percentage.Real
DiscPct
NoNone
Percent2Second discount percentage.Real
DiscPct
NoNone
PriceComponentCodeCode of the margin component for the price.String (60)
Name
NoGUPPriceComponentCode.NameNone
PriceDiscGroupTypeType of price discount group: standard, source code or trade allowance.Enum
MCRPriceDiscGroupType (enum)
NoNone
PriceHistoryPotentialTypePossible type of price or discount, such as price, line discount or end of a range.Enum
MCRPriceHistoryPotentialType (enum)
NoNone
PriceHistoryTypeType of price or discount, such as item price, line discount or total discount.Enum
MCRPriceHistoryType (enum)
NoNone
PriceHistoryUnitPriceUnit price stored in the history.Real
MCRPriceHistoryUnitPrice
NoNone
PriceQtyQuantity that the price applies to.Real
PriceQty
NoNone
PriceUnitNumber of units that the price covers.Real
PriceUnit
NoNone
QuantityAmountStart of the quantity or amount range.Real
AmountQty
NoNone
QuantityAmountToEnd of the quantity or amount range.Real
AmountQuantityTo
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
RelationType of price or discount relation, for purchase or sales, such as price, line discount or total discount.Enum
PriceType (enum)
NoNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
UnitIdUnit of measure for the price.String
UnitOfMeasureSymbol
NoUnitOfMeasure.SymbolNone

Indexes (2)

Relations (14)

Each relation joins MCRPriceHistory to another table on the fields shown.

  • Currency → Currency

    Join on Currency = Currency.CurrencyCode

    Many MCRPriceHistory records → zero or one Currency record

  • CustTable → CustTable

    Join on AccountRelation = CustTable.AccountNum, AccountCode = PriceDiscPartyCodeType::Table

    Many MCRPriceHistory records → zero or one CustTable record

  • InventDim → InventDim

    Join on InventDimId = InventDim.inventDimId

    Many MCRPriceHistory records → zero or one InventDim record

  • InventItemGroup → InventItemGroup

    Join on ItemRelation = InventItemGroup.ItemGroupId, ItemCode = PriceDiscProductCodeType::GroupId

    Many MCRPriceHistory records → zero or one InventItemGroup record

  • InventTable → InventTable

    Join on ItemRelation = InventTable.ItemId, ItemCode = PriceDiscProductCodeType::Table

    Many MCRPriceHistory records → zero or one InventTable record

  • InventTableModule → InventTableModule

    Join on RefTableId = InventTableModule.TableId, RefRecId = InventTableModule.RecId

    Many MCRPriceHistory records → zero or one InventTableModule record

  • PriceDiscTable → PriceDiscTable

    Join on RefTableId = PriceDiscTable.TableId, RefRecId = PriceDiscTable.RecId

    Many MCRPriceHistory records → zero or one PriceDiscTable record

  • TAMMerchandisingEvent → TAMMerchandisingEvent

    Join on MerchandisingEventID = TAMMerchandisingEvent.MerchandisingEventID

    Zero or one MCRPriceHistory record → zero or one TAMMerchandisingEvent record

  • UnitOfMeasure → UnitOfMeasure

    Join on UnitId = UnitOfMeasure.Symbol

    Many MCRPriceHistory records → zero or one UnitOfMeasure record

  • CustEndGroup → PriceDiscGroup

    Join on PriceDiscGroup.Type = PriceGroupType::EndDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust, relation = PriceType::EndDiscSales, AccountCode = PriceDiscPartyCodeType::GroupId, AccountRelation = PriceDiscGroup.GroupId

    Many MCRPriceHistory records → zero or one PriceDiscGroup record

  • CustLineGroup → PriceDiscGroup

    Join on PriceDiscGroup.Type = PriceGroupType::LineDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust, relation = PriceType::LineDiscSales, AccountCode = PriceDiscPartyCodeType::GroupId, AccountRelation = PriceDiscGroup.GroupId

    Many MCRPriceHistory records → zero or one PriceDiscGroup record

  • CustMultiGroup → PriceDiscGroup

    Join on PriceDiscGroup.Type = PriceGroupType::MultiLineDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust, relation = PriceType::MultiLineDiscSales, AccountCode = PriceDiscPartyCodeType::GroupId, AccountRelation = PriceDiscGroup.GroupId

    Many MCRPriceHistory records → zero or one PriceDiscGroup record

  • CustPriceGroup → PriceDiscGroup

    Join on PriceDiscGroup.Type = PriceGroupType::PriceGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust, relation = PriceType::PriceSales, AccountCode = PriceDiscPartyCodeType::GroupId, AccountRelation = PriceDiscGroup.GroupId

    Many MCRPriceHistory records → zero or one PriceDiscGroup record

  • PriceComponentCode → GUPPriceComponentCode

    Join on PriceComponentCode = GUPPriceComponentCode.Name

    Zero 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.

Email sales@drdynamics.co.uk