Table
MCRHistSalesTable
Sales order history
Holds a history copy of sales order header data, with one record per sales order ID. It carries customer, delivery, invoicing, payment, discount, intercompany and shipping carrier details. It also holds call centre settings such as continuity, exchange and standing orders. It links back to the live order through SalesTableRefRecId.
- Table name
MCRHistSalesTable- Module
Commerce transactions and orders- Table group
WorksheetHeader- Table type
Regular- Data per company
Yes- Configuration key
MCRCallCenter- Primary index
SalesIdx- Replacement key
SalesIdx- Key fields
SalesId- Model
Foundation
Fields (179)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
SalesIdSales order number; the key of this table. | String (20)SalesIdBase | Yes | None | |
AddressRefRecIdRecord ID of the address-related record this row points to; the table is given by the reference table ID. | Int64AddressRefRecId | No | None | |
AddressRefTableIdID of the table that the address reference record belongs to. | IntegerAddressRefTableId | No | None | |
AutoSummaryModuleTypeSays whether summary update parameters apply to the customer or to the sales order. | EnumModuleCustSales (enum) | No | None | |
BankCentralBankPurposeCodeCentral bank purpose code recorded for the order. | StringBankCentralBankPurposeCode | No | None | |
BankCentralBankPurposeTextFree text that explains the central bank purpose. | String (210)BankCentralBankPurposeText | No | None | |
BankDocumentTypeType of bank document linked to the order, such as letter of credit or import collection. | EnumBankDocumentFacilityNatureBankDocumentType (enum) | No | None | |
CaseTaggingYes/No flag for tagging cases, as in RFID tagging. | EnumRFIDCaseTaggingNoYes (enum) | No | None | |
CashDiscCode of the cash discount applied to the order. | StringCustCashDiscCode | No | None | |
CashDiscPercentCash discount as a percentage. | RealDiscPct | No | None | |
CommissionGroupCommission group for the customer. | StringCommissCustomerGroup | No | None | |
ContactPersonIdID of the contact person for the order. | String (20)ContactPersonId | No | None | |
CountyOrigDestCounty of origin or destination, used for address and statistics data. | String (30)AddressCountyOrigDest | No | None | |
CovStatusStatus number used for the cash flow forecast. | IntegerCovStatus | 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 | |
CreditCardApprovalAmountAmount approved on the credit card, in the accounting currency. | RealAmountMST | No | None | |
CreditCardAuthorizationAuthorisation code returned for the credit card payment. | String (36)CreditCardAuthorization | No | None | |
CreditCardAuthorizationErrorYes/No flag that shows whether a capture error occurred. | EnumNoYesIdNoYes (enum) | No | None | |
CreditCardCustRefIdPoints to the customer credit card record used for the order. | Int64MCRCreditCardCustRefRecId | No | CreditCardCust.RecId | None |
CreditCardProcessorTransactionIdTransaction reference given by the credit card processor. | String (48)CreditCardProcessorTransactionId | No | None | |
CurrencyCodeCurrency code of the order. | String (3)CustCurrencyCode | No | None | |
CustAccountCustomer account that the order belongs to. | String (20)CustAccount | Yes | CustTable.AccountNum | None |
CustGroupCustomer group of the customer. | StringCustGroupId | No | None | |
CustInvoiceIdInvoice number linked to the order. | String (20)CustInvoiceId | No | None | |
CustomerRefThe customer's own reference text for the order. | String (60)CustRef | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DeadlineDeadline date for the order. | DateSalesDeadline | No | None | |
DefaultDimensionPoints to the set of default financial dimension values for the order. | Int64DimensionDefault | No | DimensionAttributeValueSet.RecId | None |
DeliveryAddressFull delivery address as one text. | 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 | |
DeliveryDateShip date for the delivery. | DateSalesShippingDate | 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 | |
DeliveryPostalAddressPoints 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 | |
DeliveryZipCodeZIP or postal code of the delivery address. | StringLogisticsAddressZipCodeId | No | None | |
DiscPercentOrder-level discount percentage taken from trade agreements; other discount types are not included. | RealSalesEndDiscPct | No | None | |
DlvModeMode of delivery, such as the transport method. | StringCustDlvModeId | No | None | |
DlvReasonCode that gives the reason for the delivery. | StringDlvReasonId | No | None | |
DlvTermDelivery terms agreed for the order. | StringCustDlvTermId | No | None | |
DocumentStatusLatest document type produced for the order, such as confirmation, packing slip or invoice. | EnumDocumentStatus (enum) | No | None | |
EInvoiceAccountCodeDimension account code used for electronic invoicing. | String (35)EInvoiceAccountCode | No | None | |
EInvoiceLineSpecYes/No flag for line-specific electronic invoicing. | EnumEInvoiceLineSpecificNoYes (enum) | No | None | |
EmailEmail address linked to the order. | String (80)Email | No | None | |
EndDiscTotal discount group code. | StringCustEndDiscCode | No | None | |
EnterpriseNumberEnterprise number of the customer for tax purposes. | String (50)TaxEnterpriseNumber | No | None | |
EstimateEstimated gross amount of the order; currency not stated in the metadata. | RealSalesEstimateGross | No | None | |
ExportReasonText that gives the reason for export. | String (30)SalesExportReason | No | None | |
FixedDueDateFixed due date set for payment. | DateSalesFixedDueDate | No | None | |
FixedExchRateFixed exchange rate to use for the order. | RealSalesFixedExchRate | No | None | |
FreightSlipTypeType of call tag, for example UPS. | EnumCustFreightSlipTypeFreightSlipType (enum) | No | None | |
FreightZoneUPS zone used for freight. | StringCustFreightZoneId | No | None | |
GiroTypeType of payment slip attached to the customer invoice, such as FIK or Blue slip. | EnumPaymentStubInvoiceIdPaymentStub (enum) | No | None | |
InclTaxYes/No flag that shows whether prices include sales tax. | EnumInclTaxNoYes (enum) | No | None | |
InterCompanyAllowIndirectCreationYes/No flag that allows indirect creation of intercompany orders. | EnumInterCompanyAllowIndirectCreationNoYes (enum) | No | None | |
InterCompanyAllowIndirectCreationOrigOriginal value of the allow indirect creation flag for intercompany orders. | EnumInterCompanyAllowIndirectCreationNoYes (enum) | No | None | |
InterCompanyAutoCreateOrdersYes/No flag for creating intercompany orders automatically. | EnumInterCompanyAutoCreateOrdersNoYes (enum) | No | None | |
InterCompanyCompanyIdCompany (legal entity) used on the intercompany order. | StringInterCompanyCompanyId | No | None | |
InterCompanyDirectDeliveryYes/No flag for direct delivery in an intercompany order. | EnumInterCompanyDirectDeliveryNoYes (enum) | No | None | |
InterCompanyDirectDeliveryOrigOriginal value of the direct delivery flag for intercompany orders. | EnumInterCompanyDirectDeliveryNoYes (enum) | No | None | |
InterCompanyOrderYes/No flag that marks the order as intercompany. | EnumInterCompanyCustomerNoYes (enum) | No | None | |
InterCompanyOriginShows whether the intercompany order is the source or derived from another order. | EnumInterCompanyOrigin (enum) | No | None | |
InterCompanyOriginalCustAccountCustomer account on the original intercompany order. | String (20)InterCompanyOriginalCustAccount | No | None | |
InterCompanyOriginalSalesIdSales order ID of the original intercompany order. | String (20)InterCompanyOriginalSalesId | No | None | |
InterCompanyPurchIdPurchase order ID linked in the intercompany chain. | String (20)InterCompanyPurchId | No | None | |
InterCompanySkipUpdateYes/No flag with no label. Purpose not clear from the metadata.low confidence | EnumNoYes (enum) | No | None | |
InventLocationIdWarehouse for the order. | StringSalesInventLocationId | No | None | |
InventSiteIdInventory site for the order. | StringInventSiteId | No | None | |
InvoiceAccountCustomer account that receives the invoice. | String (20)CustInvoiceAccount | No | None | |
ItemTaggingYes/No flag for tagging items, as in RFID tagging. | EnumRFIDItemTaggingNoYes (enum) | No | None | |
LanguageIdLanguage code of the customer for the order. | String (7)CustLanguageId | No | None | |
LineDiscLine discount group code. | StringCustLineDiscCode | No | None | |
ListcodeList code used for EU trade reporting, such as triangular trade or production on toll. | EnumListcodeIdListcode (enum) | No | None | |
ManualEntryChangepolicyPoints to a price discount change policy record; labelled Dummy.low confidence | Int64PriceDiscPolicyManual | No | PriceDiscChangePolicy.RecId | None |
MarkupGroupCharges group code for the order. | StringCustMarkupGroupId | No | None | |
MatchingAgreementPoints to the agreement header linked to the order. | Int64AgreementHeaderRecId | No | AgreementHeader.RecId | None |
MCRAdvanceCreditYes/No flag for advance credit. | EnumMCRAdvanceCreditNoYes (enum) | No | None | |
MCRAdvanceExchangeAdvance exchange status, such as hold for receipt or release exchange. | EnumMCRAdvanceExchange (enum) | No | None | |
MCRApplyCreditToExchangeYes/No flag for applying credit to an exchange. | EnumMCRApplyCreditToExchangeNoYes (enum) | No | None | |
MCRCloseDateDate the order was closed. | DateTransDate | No | None | |
MCRContinuitychildYes/No flag that marks the order as a continuity child order. | EnumMCRContinuityChildOrderNoYes (enum) | No | None | |
MCRContinuityLineEvalPayment evaluation for continuity lines, such as pay all now or paid; no label is given.low confidence | EnumMCRContinuityLineEval (enum) | No | None | |
MCRContinuityOrderYes/No flag that marks the order as a continuity order. | EnumMCRContinuityOrderNoYes (enum) | No | None | |
MCRDefaultClassificationDefault classification code for the order. | StringMCRDefaultClassification | No | None | |
MCREndOrderYes/No flag for an end order.low confidence | EnumNoYes (enum) | No | None | |
MCRExpediteExpedite code for the order. | StringMCRExpedite | No | None | |
MCRFTCExemptYes/No flag that exempts the order from automatic notification and cancellation. | EnumMCRFTCExemptNoYes (enum) | No | None | |
MCRInclCompleteYes/No flag to include the complete order. | EnumNoYes (enum) | No | None | |
MCRInstallmentOrderSubmittedYes/No flag that shows whether the installment order was submitted. | EnumNoYes (enum) | No | None | |
MCRIsExchangeYes/No flag that marks the order as an exchange. | EnumNoYes (enum) | No | None | |
MCRIsStandingOrderYes/No flag that marks the order as a standing order. | EnumNoYes (enum) | No | None | |
MCRIsTemplateYes/No flag that marks the order as a template. | EnumNoYes (enum) | No | None | |
MCRIsTemplateActiveYes/No flag that shows whether the order template is active. | EnumNoYes (enum) | No | None | |
MCRLastInvoiceDateDate of the last invoice for the order. | DateTransDate | No | None | |
MCRMarkupTotalTotal amount of charges on the order; currency not stated in the metadata. | RealMarkupAmount | No | None | |
MCROfferUpSellShownYes/No flag that shows whether a catalogue up-sell was shown. | EnumNoYesIdNoYes (enum) | No | None | |
MCROriginalBalanceOriginal balance of the order, in the transaction currency. | RealAmountCur | No | None | |
MCROriginalSalesIdSales order ID of the original order. | String (20)MCROriginalSalesId | No | None | |
MCROrigShippingDateRequestedShip date that was first requested. | DateSalesShippingDateRequested | No | None | |
MCROutOfBalanceReleasedHow an out-of-balance amount was handled, such as bill, write off or refund. | EnumMCROutOfBalanceReleaseType (enum) | No | None | |
MCRPaymOutOfBalanceShows whether payment is overpaid or underpaid. | EnumMCRPaymOutOfBalance (enum) | No | None | |
MCRPriceOverrideYes/No flag for a total discount override. | EnumNoYesIdNoYes (enum) | No | None | |
MCRPromptedForInstBillingOptionYes/No flag that shows whether the user was asked about installment billing. | EnumMCRPromptedForInstBillingOptionNoYes (enum) | No | None | |
MCRReceiptDateDate the goods were received. | DateDlvDate | No | None | |
MCRRefWMSShipmentIdShipment ID from warehouse management linked to the order. | String (20)WMSShipmentId | No | None | |
MCRSalesTableCreatedDateTimeDate and time the order was created. | UtcDateTimeDateTimeAccepted | No | None | |
MCRShipCompleteYes/No flag that asks for the order to ship complete. | EnumNoYes (enum) | No | None | |
MCRSmmTMCallListIDID of the call list linked to the order. | String (20)smmTMCallListID | No | None | |
MCRSOAllocPriorityPriority of the order for fulfilment, from High 1 to Low 10. | EnumMCRSOAllocPriority (enum) | No | None | |
MCRSourceIdSource code of the order. | String (20)MCRSourceIdForm | No | None | |
MCRWebConfirmDtTimeDate and time the web order was confirmed. | UtcDateTimeTransDateTime | No | None | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | None | |
MultiLineDiscMultiline discount group code. | StringCustMultiLineDiscCode | No | None | |
NumberSequenceGroupNumber sequence group used for the order. | StringNumberSequenceGroupId | No | None | |
OneTimeCustomerYes/No flag that marks the customer as one-time. | EnumOneTimeCustomerNoYes (enum) | No | None | |
PalletTaggingYes/No flag for tagging pallets, as in RFID tagging. | 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 | |
PaymentPayment terms code for the order. | String (100)CustPaymTermId | No | None | |
PaymentSchedPayment schedule code for the order. | String (30)PaymSchedId | No | None | |
PaymModeMethod of payment for the order. | StringCustPaymMode | No | None | |
PaymSpecPayment specification code. | StringCustPaymSpec | No | None | |
PortPort code used for Intrastat reporting. | StringIntrastatPortId | No | None | |
PostingProfileCustomer posting profile for the order. | StringCustPostingProfile | No | None | |
PriceGroupIdPrice group of the customer for the order. | StringCustPriceGroup | No | None | |
ProjIdProject ID linked to the order. | String (20)ProjId | No | None | |
PurchIdPurchase order ID linked to the order. | String (20)PurchId | No | None | |
PurchOrderFormNumCustomer's requisition or purchase order number. | String (20)CustPurchaseOrder | No | None | |
QuotationIdID of the quotation the order came from. | String (20)QuotationId | No | None | |
ReceiptDateConfirmedConfirmed receipt date for the goods. | DateSalesReceiptDateConfirmed | No | None | |
ReceiptDateRequestedReceipt date the customer asked for. | DateSalesReceiptDateRequested | 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 | |
ReservationHow stock is reserved for the order: manual, automatic or explosion. | EnumItemReservation (enum) | No | None | |
ReturnDeadlineDeadline date for a return. | DateReturnDeadline | No | None | |
ReturnItemNumReturn merchandise authorisation (RMA) number. | StringSalesReturnItemNum | No | None | |
ReturnReasonCodeIdCode that gives the reason for a return. | StringReturnReasonCodeId | No | None | |
ReturnReplacementCreatedYes/No flag for an up-front replacement on a return. | EnumReturnReplacementCreatedNoYes (enum) | No | None | |
ReturnReplacementIdReference to the replacement order. | String (20)ReturnReplacementId | No | None | |
ReturnStatusStatus of a return: none, created, open, cancelled or closed. | EnumReturnStatusHeader (enum) | No | None | |
SalesGroupSales group used for commission. | StringCommissSalesGroup | No | None | |
SalesNameName on the sales order. | String (60)SalesName | No | None | |
SalesOriginIdCode for the origin of the sales order. | StringSalesOriginId | No | None | |
SalesPoolIdSales pool the order belongs to. | StringSalesPoolId | No | None | |
SalesStatusOrder status: none, open order, delivered, invoiced or cancelled. | EnumSalesStatus (enum) | No | None | |
SalesTableRefRecIdPoints to the sales order record this history row relates to. | Int64SalesTableRefRecId | No | SalesTable.RecId | None |
SalesTypeType of order, such as sales order, returned order, subscription or customer prepayment. | EnumSalesType (enum) | No | None | |
SalesUnitIdSales unit ID. | String (20)smmSalesUnitId | No | None | |
SettleVoucherSettlement type: none, open transactions or designated transactions. | EnumSalesSettlementTypeSettlementType (enum) | No | None | |
ShipCarrierAccountCustomer's account number with the carrier. | String (25)ShipCarrierAccount | No | None | |
ShipCarrierAccountCodeAccount code for the carrier. | String (20)ShipCarrierAccountCode | No | None | |
ShipCarrierBlindShipmentYes/No flag for a blind shipment. | EnumShipCarrierBlindShipmentNoYes (enum) | No | None | |
ShipCarrierDeliveryContactName of the delivery contact for the carrier. | String (60)Name | No | None | |
ShipCarrierDlvTypeCarrier service type: miscellaneous, ground, air or pickup. | EnumShipCarrierDlvType (enum) | No | None | |
ShipCarrierExpeditedShipmentYes/No flag for an expedited shipment. | EnumShipCarrierExpeditedShipmentNoYes (enum) | No | None | |
ShipCarrierFuelSurchargeYes/No flag for charging a fuel surcharge. | EnumShipCarrierFuelSurchargeNoYes (enum) | No | None | |
ShipCarrierIdID of the carrier. | StringShipCarrierId | No | None | |
ShipCarrierNameName of the third-party carrier. | String (100)LogisticsShipCarrierName | No | None | |
ShipCarrierPostalAddressPoints to the postal address record for the carrier. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
ShipCarrierResidentialYes/No flag that marks a residential destination. | EnumShipCarrierResidentialDestNoYes (enum) | No | None | |
ShippingDateConfirmedConfirmed ship date. | DateSalesShippingDateConfirmed | No | None | |
ShippingDateRequestedShip date the customer asked for. | DateSalesShippingDateRequested | No | None | |
SkipUpdateControls whether intercompany updates are skipped: no, internal, intercompany or both. | EnumInterCompanySkipUpdate (enum) | No | None | |
smmCampaignIdCampaign ID linked to the order. | StringsmmCampaignId | No | None | |
smmSalesAmountTotalTotal sales amount of the order; currency not stated in the metadata. | RealsmmSalesAmountTotal | No | None | |
SourceDocumentHeaderPoints to the source document header record for the order. | Int64SourceDocumentHeaderRefRecId | No | SourceDocumentHeader.RecId | None |
StatProcIdStatistics procedure code used for Intrastat. | StringIntrastatProcId | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TaxGroupSales tax group of the order. | StringTaxGroup | No | None | |
TouchedYes/No flag for update status.low confidence | EnumTradeTouchedNoYes (enum) | No | None | |
TransactionCodeTransaction code used for Intrastat. | StringIntrastatTransactionCodeId | No | None | |
TransportTransport code used for Intrastat. | StringIntrastatTransport | No | None | |
URLInternet address linked to the order. | String (255)URL | No | None | |
VATNumTax exempt number. | String (20)VATNumJournal | No | None | |
WorkerSalesResponsibleWorker responsible for the sale. | Int64WorkerSalesResponsible | No | HcmWorker.RecId | None |
WorkerSalesTakerWorker who took the order. | Int64SalesTaker | No | HcmWorker.RecId | None |
Indexes (2)
SalesIdxPrimary indexReplacement keyUnique, alternate key.
CustIdxUnique.
Relations (12)
Each relation joins MCRHistSalesTable to another table on the fields shown.
Agreement→AgreementHeaderJoin on
MatchingAgreement = AgreementHeader.RecIdMany MCRHistSalesTable records → zero or one AgreementHeader record
Common→CommonJoin on
AddressRefRecId = Common.RecId,AddressRefTableId = Common.TableIdMany MCRHistSalesTable records → zero or one Common record
CreditCard→CreditCardCustJoin on
CreditCardCustRefId = CreditCardCust.RecIdMany MCRHistSalesTable records → zero or one CreditCardCust record
DefaultDimension→DimensionAttributeValueSetJoin on
DefaultDimension = DimensionAttributeValueSet.RecIdMany MCRHistSalesTable records → zero or one DimensionAttributeValueSet record
DeliveryPostalAddress_FK→LogisticsPostalAddressJoin on
DeliveryPostalAddress = LogisticsPostalAddress.RecIdMany MCRHistSalesTable records → zero or one LogisticsPostalAddress record
MCRCustomerAccount→CustTableJoin on
CustAccount = CustTable.AccountNumMany MCRHistSalesTable records → exactly one CustTable record
PriceDiscChangePolicyRecId2→PriceDiscChangePolicyJoin on
ManualEntryChangepolicy = PriceDiscChangePolicy.RecIdMany MCRHistSalesTable records → zero or one PriceDiscChangePolicy record
SalesTableRefRecId→SalesTableJoin on
SalesTableRefRecId = SalesTable.RecIdMany MCRHistSalesTable records → zero or one SalesTable record
ShipCarrierPostalAddress_FK→LogisticsPostalAddressJoin on
ShipCarrierPostalAddress = LogisticsPostalAddress.RecIdMany MCRHistSalesTable records → zero or one LogisticsPostalAddress record
SourceDocumentHeader→SourceDocumentHeaderJoin on
SourceDocumentHeader = SourceDocumentHeader.RecIdMany MCRHistSalesTable records → zero or one SourceDocumentHeader record
WorkerSalesResponsible_FK→HcmWorkerJoin on
WorkerSalesResponsible = HcmWorker.RecIdMany MCRHistSalesTable records → zero or one HcmWorker record
WorkerSalesTaker_FK→HcmWorkerJoin on
WorkerSalesTaker = HcmWorker.RecIdMany MCRHistSalesTable records → zero or one HcmWorker record
Get this data out
No public entity reads from MCRHistSalesTable. Its data is only reachable through the application, a custom entity or a database export.
Need help with MCRHistSalesTable in a report, an integration or a migration? Talk to Dr Dynamics.