Table
MCRHistSalesLine
Sales order line history
Holds history copies of sales order lines, one row per order line. The key is the sales order number plus the line number, and each row links to the sales order history header (MCRHistSalesTable) and to the original sales line. It carries item, quantity, price, delivery, tax, project, shipping carrier and return details for the line.
- Table name
MCRHistSalesLine- Module
Commerce transactions and orders- Table group
WorksheetLine- Table type
Regular- Data per company
Yes- Configuration key
MCRCallCenter- Primary index
SalesLineIdx- Replacement key
None- Key fields
SalesId, LineNum, RecId- Model
Foundation
Fields (150)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
SalesIdSales order number; links to the sales order history header and is part of the key. | String (20)SalesIdBase | Yes | MCRHistSalesTable.SalesId | None |
LineNumLine number within the sales order; part of the key. | RealLineNum | 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 | |
ActivityNumberProject activity number linked to the line. | String (50)ProjActivityNumber | No | None | |
AddressRefRecIdSystem record ID of the record that the address reference points to. | Int64AddressRefRecId | No | None | |
AddressRefTableIdID of the table that the address reference points to. | IntegerAddressRefTableId | No | None | |
BarCodeBar code value for the item on the line. | String (80)SalesBarCode | No | None | |
BarCodeTypeBar code setup used for the line's bar code. | StringBarcodeSetupId | No | None | |
BlockedYes/No flag showing whether the line is stopped. | EnumLineStoppedNoYes (enum) | No | None | |
CaseTaggingYes/No flag for RFID tagging at case level. | EnumRFIDCaseTaggingNoYes (enum) | No | None | |
CompleteYes/No flag that stops the line being delivered in parts. | EnumLineCompleteNoYes (enum) | No | None | |
ConfirmedDlvShip date held on the line. | DateSalesShippingDate | No | None | |
CostPriceCost price used for a returned item. | RealReturnCostPrice | No | None | |
CountyOrigDestCounty of origin or destination of the goods. | String (30)AddressCountyOrigDest | No | None | |
CreatedByThe user who created the record. System field. | String (20)CreatedBy | No | None | |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | None | |
CurrencyCodeCurrency code of the line. | String (3)CustCurrencyCode | No | None | |
CustAccountCustomer account of the order, pointing to the customer record. | String (20)CustAccount | Yes | CustTable.AccountNum | None |
CustGroupCustomer group ID. | StringCustGroupId | No | None | |
CustomerLineNumLine number as used by the customer. | IntegerCustLineNum | No | None | |
CustomerRefCustomer's own reference for the line. | String (60)CustRefLine | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DefaultDimensionLink to the default financial dimension set for the line. | Int64DimensionDefault | No | DimensionAttributeValueSet.RecId | None |
DeliveryAddressDelivery address as a single text value. | String (250)Addressing | No | None | |
DeliveryCityCity of the delivery address. | String (60)AddressCity | No | None | |
DeliveryCountryRegionIdCountry or region of the delivery address. | StringAddressCountryRegionId | No | None | |
DeliveryCountyCounty of the delivery address. | String (30)AddressCountyId | No | None | |
DeliveryDateControlTypeMethod used to control the delivery date, such as sales lead time, ATP or CTP. | EnumSalesDeliveryDateControlType (enum) | No | None | |
DeliveryNameName of the party receiving the delivery. | String (160)CustName | No | None | |
DeliveryPostalAddressLink to the postal address record used for delivery. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
DeliveryStateState of the delivery address. | StringLogisticsAddressStateId | No | None | |
DeliveryStreetStreet of the delivery address. | String (250)AddressStreet | No | None | |
DeliveryTypeShows whether the line is delivered from stock or by direct delivery. | EnumTradeLineDlvTypeIdTradeLineDlvType (enum) | No | None | |
DeliveryZipCodeZIP or postal code of the delivery address. | StringLogisticsAddressZipCodeId | No | None | |
DlvModeMode of delivery for the line. | StringDlvModeId | No | None | |
EInvoiceAccountCodeDimension account code used for electronic invoicing. | String (35)EInvoiceAccountCode | No | None | |
ExpectedRetQtyQuantity expected back on a return line. | RealReturnExpectedRetQty | No | None | |
ExternalItemIdItem number used by the customer or an external party. | String (20)SalesExternalItemId | No | None | |
InterCompanyInventTransIdLot reference for the matching intercompany transaction. | String (20)InventRefTransId | No | None | |
InterCompanyOriginShows whether the intercompany order is the source or derived from another one. | EnumInterCompanyOrigin (enum) | No | None | |
InventDeliverNowQuantity to deliver now, in inventory units. | RealInventQty | No | None | |
InventDimIdLink to the inventory dimensions of the line. | String (20)InventDimId | No | InventDim.inventDimId | None |
InventRefIdNumber of the order or document that this line refers to. | String (20)InventRefId | No | None | |
InventRefTransIdLot ID of the referenced transaction. | String (20)InventRefTransId | No | None | |
InventRefTypeType of the referenced document, such as sales order, purchase order or production. | EnumInventRefType (enum) | No | None | |
InventTransIdInventory lot ID of the line. | String (20)InventTransId | No | None | |
InventTransIdReturnLot ID of the original line for a return. | String (20)InventTransIdReturn | No | None | |
ItemBOMIdBill of materials ID used for the item. | String (20)ItemBOMId | No | None | |
ItemIdItem number on the line. | String (20)ItemIdSmall | Yes | None | |
ItemReplacedYes/No flag showing whether the returned item is replaced. | EnumReturnItemReplacedNoYes (enum) | No | None | |
ItemRouteIdRoute ID used for the item. | String (20)ItemRouteId | No | None | |
ItemTaggingYes/No flag for RFID tagging at item level. | EnumRFIDItemTaggingNoYes (enum) | No | None | |
LedgerDimensionLink to the ledger account and dimension combination for the line. | Int64LedgerDimensionDefaultAccount | No | DimensionAttributeValueCombination.RecId | None |
LineAmountNet amount of the line. | RealSalesLineAmount | No | None | |
LineDeliveryTypeShows whether the line has one delivery, several deliveries, or is a delivery line. | EnumLineDeliveryType (enum) | No | None | |
LineDiscDiscount amount on the line. | RealSalesLineDisc | No | None | |
LineHeaderHeading text for the line. | String (80)LineHeader | No | None | |
LinePercentDiscount percentage on the line. | RealSalesLinePercent | No | None | |
ManualEntryChangepolicyLink to a price and discount change policy record; labelled Dummy.low confidence | Int64PriceDiscPolicyManual | No | PriceDiscChangePolicy.RecId | None |
MatchingAgreementLineLink to the agreement line that matches this sales line. | Int64AgreementLineRecId | No | AgreementLine.RecId | None |
MCRContinuityScheduleIdID of the continuity schedule for the line. | String (20)MCRContinuityScheduleID | No | None | |
MCRCreateReplacementYes/No flag for creating a replacement. | EnumMCRCreateReplacementNoYes (enum) | No | None | |
MCRCustInvoiceTransRecIdWhole number holding a record ID, probably of a customer invoice transaction.low confidence | Int64SysInt64 | No | None | |
MCRDropShipCommentFree-text comment for a direct delivery. | String (250)MCRDropShipComment | No | None | |
MCRDropShipmentYes/No flag showing whether the line is a direct delivery. | EnumMCRDropShipmentNoYes (enum) | No | None | |
MCRDropShipStatusProgress of a direct delivery, from to be delivered through purchase order created, released and shipped. | EnumMCRDropShipStatus (enum) | No | None | |
MCRExchangeInventRefTransIdLot ID of the exchange transaction. | String (20)MCRExchangeInventRefTransId | No | None | |
MCRExpediteExpedite code for the line. | StringMCRExpedite | No | None | |
MCRInstallmentEligibleYes/No flag showing whether the line can be paid in instalments. | EnumMCRInstallmentEligibleNoYes (enum) | No | None | |
MCRInventDimIdOrigOriginal inventory dimension ID of the line. | String (20)InventDimId | No | None | |
MCRInvoicedInTotalTotal quantity invoiced on the line. | RealSalesQty | No | None | |
MCRItemIdOrigItem number originally on the line. | String (20)ItemIdSmall | No | None | |
MCRLineDiscGroupLine discount group of the line. | StringCustLineDiscCode | No | None | |
MCRLineTypeKind of line: catalog free gift, regular or continuity parent. | EnumMCRLineType (enum) | No | None | |
MCRListPriceOriginal unit price before any change. | RealMCROriginalUnitPrice | No | None | |
MCRListPriceCurrencyCodeCurrency code for the original unit price. | String (3)CustCurrencyCode | No | None | |
MCRParentLotIdLot ID of the parent line. | String (20)InventTransId | No | None | |
MCRPickWaveRefReference to the pick wave for the line. | String (20)MCRPickingWave | No | None | |
MCRPriceGroupIdPrice group ID for the line. | StringCustPriceGroup | No | None | |
MCRPriceOverrideYes/No flag showing whether the price was overridden. | EnumNoYes (enum) | No | None | |
MCRReasonCodeSubcode that gives a reason; works together with the info code. | StringRetailInformationSubcodeId | No | RetailInformationSubcodeTable.subcodeId | None |
MCRSalesLineCreatedDateTimeDate and time the line was created. | UtcDateTimeDateTimeAccepted | No | None | |
MCRSalesUOMSales unit of measure value for the line.low confidence | RealMCRSalesUOM | No | None | |
MCRShipToAccountRefCustomer account that the line ships to. | String (20)CustAccount | No | None | |
MCRSourceIdSource code of the line. | String (20)MCRSourceID | No | None | |
MCRUpSellOriginWhere the line came from: item cross-sell, item up-sell or catalog. | EnumMCRUpSellOrigin (enum) | No | None | |
MCRUpSellOriginRefReference to the item or offer behind the up-sell origin; the label does not match the data type.low confidence | String (20)MCRItemIdOfferId | No | None | |
MCRWMSStatusABC class of the line for warehouse management. | EnumABC (enum) | No | None | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | None | |
MultiLnDiscMultiline discount amount. | RealSalesMultiLnDisc | No | None | |
MultiLnPercentMultiline discount percentage. | RealSalesMultiLnPercent | No | None | |
NameFree text describing the line. | String (1000)ItemFreeTxt | No | None | |
OverDeliveryPctPercentage by which delivery may exceed the ordered quantity. | RealSalesOverDeliveryPct | No | None | |
PackingUnitPacking unit of the item. | StringInventPackingUnit | No | None | |
PackingUnitQtyQuantity held in one packing unit. | RealInventPackingUnitQty | No | None | |
PalletTaggingYes/No flag for RFID tagging at pallet level. | EnumRFIDPalletTaggingNoYes (enum) | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PortPort used for foreign trade reporting. | StringIntrastatPortId | No | None | |
PriceUnitQuantity that the unit price applies to. | RealPriceUnit | No | None | |
ProjCategoryIdProject category of the line. | String (30)ProjCategoryId | No | None | |
ProjIdProject ID linked to the line. | String (20)ProjId | No | None | |
ProjLinePropertyIdProject line property of the line. | StringProjLinePropertyId | No | None | |
ProjTransIdProject transaction ID of the line. | String (20)ProjItemTransId | No | None | |
PurchorderFormNumCustomer's requisition or purchase order number. | String (20)CustPurchaseOrder | No | None | |
QtyOrderedOrdered quantity in inventory units. | RealInventQty | No | None | |
ReceiptDateConfirmedConfirmed date the customer receives the goods. | DateSalesReceiptDateConfirmed | No | None | |
ReceiptDateRequestedDate the customer asked to receive the goods. | DateSalesReceiptDateRequested | 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 | |
RemainInventFinancialQuantity still to invoice, in inventory units. | RealInventQty | No | None | |
RemainInventPhysicalQuantity still to deliver, in inventory units. | RealInventQty | No | None | |
RemainSalesFinancialQuantity still to invoice, in sales units. | RealSalesQty | No | None | |
RemainSalesPhysicalQuantity still to deliver, in sales units. | RealSalesQty | No | None | |
ReservationHow stock is reserved for the line: manual, automatic or explosion. | EnumItemReservation (enum) | No | None | |
RetailInfocodeIdInfo code ID; works together with the subcode. | StringRetailInfocodeId | No | RetailInformationSubcodeTable.infocodeId | None |
ReturnAllowReservationYes/No flag allowing reservation on a return line. | EnumReturnAllowReservationNoYes (enum) | No | None | |
ReturnArrivalDateDate the returned goods actually arrived. | DateReturnArrivalDate | No | None | |
ReturnClosedDateDate the return was closed. | DateReturnClosedDate | No | None | |
ReturnDeadlineEstimated arrival date for a return. | DateReturnDeadline | No | None | |
ReturnDispositionCodeIdDisposition code for a returned item. | StringReturnDispositionCodeId | No | None | |
ReturnStatusStatus of a return line, from expected to received, invoiced or cancelled. | EnumReturnStatusLine (enum) | No | None | |
SalesDeliverNowQuantity to deliver now, in sales units. | RealSalesQty | No | None | |
SalesGroupSales group of the line. | StringCommissSalesGroup | No | None | |
SalesLineRefRecIdLink to the original sales line record. | Int64SalesLineRefRecId | No | SalesLine.RecId | None |
SalesMarkupCharges added to the line. | RealSalesMarkup | No | None | |
SalesPriceUnit price of the item. | RealSalesPrice | No | None | |
SalesQtyOrdered quantity in sales units. | RealSalesOrderedQty | No | None | |
SalesStatusStatus of the line: open order, delivered, invoiced or cancelled. | EnumSalesStatus (enum) | No | None | |
SalesTypeType of order, such as sales order, returned order, subscription or journal. | EnumSalesType (enum) | No | None | |
SalesUnitUnit of measure used for selling. | StringSalesUnit | No | None | |
ScrapYes/No flag; its meaning is not stated beyond the name.low confidence | EnumNoYes (enum) | No | None | |
ServiceOrderIdService order linked to the line. | StringSMAServiceOrderId | No | None | |
ShipCarrierAccountCustomer's account number with the carrier. | String (25)ShipCarrierAccount | No | None | |
ShipCarrierAccountCodeAccount code for the carrier. | String (20)ShipCarrierAccountCode | No | None | |
ShipCarrierDlvTypeType of carrier service: miscellaneous, ground, air or pickup. | EnumShipCarrierDlvType (enum) | No | None | |
ShipCarrierIdID of the carrier. | StringShipCarrierId | No | None | |
ShipCarrierNameName of the third-party carrier. | String (100)LogisticsShipCarrierName | No | None | |
ShipCarrierPostalAddressLink to the carrier's postal address record. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
ShippingDateConfirmedConfirmed ship date. | DateSalesShippingDateConfirmed | No | None | |
ShippingDateRequestedShip date the customer asked for. | DateSalesShippingDateRequested | No | None | |
SkipUpdateSetting for skipping intercompany updates: no, internal, intercompany or both. | EnumInterCompanySkipUpdate (enum) | No | None | |
StatProcIdStatistics procedure used for foreign trade reporting. | StringIntrastatProcId | No | None | |
StatTriangularDealYes/No flag marking a triangular trade deal. | EnumIntrastatTriangularDealNoYes (enum) | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TaxAutogeneratedYes/No flag showing whether tax was generated automatically. | EnumTaxAutoGeneratedNoYes (enum) | No | None | |
TaxGroupSales tax group of the line. | StringTaxGroup | No | None | |
TaxItemGroupItem sales tax group of the line. | StringTaxItemGroup | No | None | |
TaxWithholdGroupWithholding tax group of the line. | StringTaxWithholdGroup | No | None | |
TransactionCodeTransaction code used for foreign trade reporting. | StringIntrastatTransactionCodeId | No | None | |
TransportTransport mode used for foreign trade reporting. | StringIntrastatTransport | No | None | |
UnderDeliveryPctPercentage by which delivery may fall short of the ordered quantity. | RealSalesUnderDeliveryPct | No | None |
Indexes (3)
SalesLineIdxPrimary indexUnique.
TransIdIdxNot unique.
StatIdxCustAccount,SalesStatus,MCRSalesLineCreatedDateTime,InventDimIdNot unique.
Relations (12)
Each relation joins MCRHistSalesLine to another table on the fields shown.
AgreementLine→AgreementLineJoin on
MatchingAgreementLine = AgreementLine.RecIdMany MCRHistSalesLine records → zero or one AgreementLine record
Common→CommonJoin on
AddressRefTableId = Common.TableId,AddressRefRecId = Common.RecIdMany MCRHistSalesLine records → zero or one Common record
CustTable→CustTableJoin on
CustAccount = CustTable.AccountNumOne or more MCRHistSalesLine records → exactly one CustTable record
DefaultDimension→DimensionAttributeValueSetJoin on
DefaultDimension = DimensionAttributeValueSet.RecIdMany MCRHistSalesLine records → zero or one DimensionAttributeValueSet record
DeliveryPostalAddress_FK→LogisticsPostalAddressJoin on
DeliveryPostalAddress = LogisticsPostalAddress.RecIdMany MCRHistSalesLine records → zero or one LogisticsPostalAddress record
InventDim→InventDimJoin on
InventDimId = InventDim.inventDimIdMany MCRHistSalesLine records → exactly one InventDim record
LedgerDimension→DimensionAttributeValueCombinationJoin on
LedgerDimension = DimensionAttributeValueCombination.RecIdMany MCRHistSalesLine records → zero or one DimensionAttributeValueCombination record
MCRHistSalesTable→MCRHistSalesTableJoin on
SalesId = MCRHistSalesTable.SalesIdMany MCRHistSalesLine records → exactly one MCRHistSalesTable record
MCRReasonCode→RetailInformationSubcodeTableJoin on
MCRReasonCode = RetailInformationSubcodeTable.subcodeId,RetailInfocodeId = RetailInformationSubcodeTable.infocodeIdMany MCRHistSalesLine records → zero or one RetailInformationSubcodeTable record
PriceDiscChangePolicyRecId2→PriceDiscChangePolicyJoin on
ManualEntryChangepolicy = PriceDiscChangePolicy.RecIdMany MCRHistSalesLine records → zero or one PriceDiscChangePolicy record
SalesLine→SalesLineJoin on
SalesLineRefRecId = SalesLine.RecIdMany MCRHistSalesLine records → zero or one SalesLine record
ShipCarrierPostalAddress_FK→LogisticsPostalAddressJoin on
ShipCarrierPostalAddress = LogisticsPostalAddress.RecIdMany MCRHistSalesLine records → zero or one LogisticsPostalAddress record
Get this data out
No public entity reads from MCRHistSalesLine. Its data is only reachable through the application, a custom entity or a database export.
Need help with MCRHistSalesLine in a report, an integration or a migration? Talk to Dr Dynamics.