Data entity

SalesOrderHeaderD365SalesEntity

Sales order headers prepared for exchange with Dynamics 365 Sales, keyed by sales order number. It holds customer, currency, site and warehouse, delivery and invoice addresses, dates, discounts and totals. Extra fields cover processing status and how the order was created.

Entity name
SalesOrderHeaderD365SalesEntity
Public entity name
D365SalesOrderHeader
OData collection
D365SalesOrderHeaders
Category
Document
Module
Sales and marketing
Read-only
No
Data management enabled
Yes
Configuration key
CDSIntegration
Keys
SalesOrderNumber
Staging table
SalesOrderHeaderD365SalesStaging

Use it in Power BI and Power Platform

OData URL
https://<environment>/data/D365SalesOrderHeaders
Dataverse virtual table
mserp_salesorderheaderd365salesentity. Listed in the virtual-table catalogue. An administrator must make the virtual table visible before you can use it.
Data management
Enabled: you can use it in import and export projects.

Data sources

  • SalesTable · root
  • HcmWorker_OrderResponsible (table HcmWorker) · OuterJoin to SalesTable · read-only
  • HcmWorker_OrderTaker (table HcmWorker) · OuterJoin to SalesTable · read-only
  • LogisticsPostalAddressBaseEntity · OuterJoin to SalesTable
  • CustDefaultInvoiceAddress (table CustDefaultInvoiceAddressView) · OuterJoin to SalesTable · read-only
  • SalesOrderTotals · OuterJoin to SalesTable · read-only
  • CustTableOrderingCustomer (table CustTable) · OuterJoin to SalesTable · read-only
  • CustTableInvoiceCustomer (table CustTable) · OuterJoin to SalesTable · read-only
  • SalesOrderLastChangeDateV2 · OuterJoin to SalesTable · read-only
  • SalesOrderChargeLastChangeDate · OuterJoin to SalesTable · read-only
  • SalesOrderOriginEntity · OuterJoin to SalesTable · read-only
  • SalesTableExternalWorkOrderStatus · OuterJoin to SalesTable

Fields (98)

Field and descriptionType / EDT / enumMandatoryOData / DataverseReferencesLineage root
ArePricesIncludingSalesTaxYes/no flag showing whether prices include sales tax.Enum
InclTax
NoYes

Platform enum: values not in the metadata extract.

NoYesSalesTable.InclTax
CashDiscountCodeCash discount code applied to the order.String
CustCashDiscCode
NoYesCashDisc.CashDiscCodeSalesTable.CashDisc
ConfirmedReceiptDateConfirmed date on which the customer receives the goods.Date
SalesReceiptDateConfirmed
NoYesSalesTable.ReceiptDateConfirmed
ConfirmedShippingDateConfirmed ship date.Date
SalesShippingDateConfirmed
NoYesSalesTable.ShippingDateConfirmed
ContactPersonIdContact person for the order, linked to the contacts.String (20)
ContactPersonId
NoYesContactPerson.ContactPersonIdSalesTable.ContactPersonId
CurrencyCodeCurrency of the order.String (3)
CustCurrencyCode
NoYesCurrency.CurrencyCodeSalesTable.CurrencyCode
CustomerRequisitionNumberCustomer's own requisition or purchase order number.String (20)
CustPurchaseOrder
NoYesSalesTable.PurchOrderFormNum
CustomersOrderReferenceReference text supplied by the customer.String (60)
CustRef
NoYesSalesTable.CustomerRef
DefaultShippingSiteIdSite for the order.String
InventSiteId
NoYesInventSite.SiteIdSalesTable.InventSiteId
DefaultShippingWarehouseIdWarehouse for the order.String
SalesInventLocationId
NoYesInventLocation.InventLocationIdSalesTable.InventLocationId
DeliveryAddressCityName of the city, as text.String (60)
LogisticsAddressCityName
NoYesLogisticsPostalAddress.City
DeliveryAddressCountryRegionIdThe country or region of the address.String
LogisticsAddressCountryRegionId
NoYesLogisticsAddressCountryRegion.CountryRegionIdLogisticsPostalAddress.CountryRegionId
DeliveryAddressCountryRegionISOCodeISO code of the country or region of the address.String (2)
LogisticsAddressCountryRegionISOCode
NoYesNone
DeliveryAddressCountyIdCounty code of the address. It depends on the country and state.String (30)
LogisticsAddressCountyId
NoYesLogisticsAddressCounty.CountyIdLogisticsPostalAddress.County
DeliveryAddressDescriptionName or description of the location.String (60)
LogisticsDescription
NoYesLogisticsLocation.Description
DeliveryAddressDistrictNameName of the district, as text.String (60)
LogisticsAddressDistrictName
NoYesLogisticsPostalAddress.DistrictName
DeliveryAddressDunsNumberThe DUNS number, up to nine characters long. It is the key of the table.String (9)
LogisticsDunsNumber
NoYesDirDunsNumber.DunsNumber
DeliveryAddressLatitudeGeographic latitude of the address.Real
LogisticsAddressLatitude
NoYesLogisticsPostalAddress.Latitude
DeliveryAddressLocationIdUnique ID of the location. It is the key of the table.String (40)
LogisticsLocationId
NoYesLogisticsLocation.LocationId
DeliveryAddressLongitudeGeographic longitude of the address.Real
LogisticsAddressLongitude
NoYesLogisticsPostalAddress.Longitude
DeliveryAddressNameName of the delivery recipient.String (100)
LogisticsDeliveryName
NoYesSalesTable.DeliveryName
DeliveryAddressPostBoxPost office box number.String (20)
LogisticsAddressPostBox
NoYesLogisticsPostalAddress.PostBox
DeliveryAddressStateIdState or province code of the address.String
LogisticsAddressStateId
NoYesLogisticsAddressCounty.StateIdLogisticsAddressState.StateIdLogisticsPostalAddress.State
DeliveryAddressStreetStreet name of the address.String (250)
LogisticsAddressStreet
NoYesLogisticsPostalAddress.Street
DeliveryAddressStreetNumberStreet or house number.String (20)
LogisticsAddressStreetNumber
NoYesLogisticsPostalAddress.StreetNumber
DeliveryAddressTimeZoneTime zone of the address.Enum
Timezone

Platform enum: values not in the metadata extract.

NoYesLogisticsPostalAddress.TimeZone
DeliveryAddressZipCodeZIP or postal code, as text.String
LogisticsAddressZipCodeId
NoYesLogisticsPostalAddress.ZipCode
DeliveryBuildingComplimentExtra building detail, such as an entrance or floor.String (60)
LogisticsAddressBuildingCompliment
NoYesLogisticsPostalAddress.BuildingCompliment
DeliveryModeCodeMode of delivery for the order.String
CustDlvModeId
NoYesDlvMode.CodeSalesTable.DlvMode
DeliveryPostalAddressRecIdA unique number that the system gives to every record. Other tables often use it to point to this record.Int64
RecId
NoYesLogisticsPostalAddress.RecId
DeliveryTermsCodeTerms of delivery for the order.String
CustDlvTermId
NoYesDlvTerm.CodeSalesTable.DlvTerm
DeliveryValidFromDate and time from which the address is effective.UtcDateTime
EffectiveDateTime
NoNo (private)LogisticsPostalAddress.ValidFrom
DeliveryValidToDate and time when the address expires.UtcDateTime
ExpirationDateTime
NoNo (private)LogisticsPostalAddress.ValidTo
EmailEmail address on the order.String (80)
Email
NoYesSalesTable.Email
FormattedDeliveryAddressDelivery address built as one text string.low confidenceString (250)NoYesNone
FormattedInvoiceAddressThe full address as one formatted text.String (250)
LogisticsAddressing
NoYesLogisticsPostalAddress.Address
InvoiceAddressCityName of the city, as text.String (60)
LogisticsAddressCityName
NoYesLogisticsPostalAddress.City
InvoiceAddressCountryRegionIdThe country or region of the address.String
LogisticsAddressCountryRegionId
NoYesLogisticsAddressCountryRegion.CountryRegionIdLogisticsPostalAddress.CountryRegionId
InvoiceAddressCountyIdCounty code of the address. It depends on the country and state.String (30)
LogisticsAddressCountyId
NoYesLogisticsAddressCounty.CountyIdLogisticsPostalAddress.County
InvoiceAddressDistrictNameName of the district, as text.String (60)
LogisticsAddressDistrictName
NoYesLogisticsPostalAddress.DistrictName
InvoiceAddressLatitudeGeographic latitude of the address.Real
LogisticsAddressLatitude
NoYesLogisticsPostalAddress.Latitude
InvoiceAddressLongitudeGeographic longitude of the address.Real
LogisticsAddressLongitude
NoYesLogisticsPostalAddress.Longitude
InvoiceAddressPostBoxPost office box number.String (20)
LogisticsAddressPostBox
NoYesLogisticsPostalAddress.PostBox
InvoiceAddressStateIdState or province code of the address.String
LogisticsAddressStateId
NoYesLogisticsAddressCounty.StateIdLogisticsAddressState.StateIdLogisticsPostalAddress.State
InvoiceAddressStreetStreet name of the address.String (250)
LogisticsAddressStreet
NoYesLogisticsPostalAddress.Street
InvoiceAddressStreetNumberStreet or house number.String (20)
LogisticsAddressStreetNumber
NoYesLogisticsPostalAddress.StreetNumber
InvoiceAddressTimeZoneTime zone of the address.Enum
Timezone

Platform enum: values not in the metadata extract.

NoYesLogisticsPostalAddress.TimeZone
InvoiceAddressZipCodeZIP or postal code, as text.String
LogisticsAddressZipCodeId
NoYesLogisticsPostalAddress.ZipCode
InvoiceBuildingComplimentExtra building detail, such as an entrance or floor.String (60)
LogisticsAddressBuildingCompliment
NoYesLogisticsPostalAddress.BuildingCompliment
InvoiceCustomerAccountNumberUnique customer account number. It identifies the customer record and is the table key.String (20)
CustAccount
NoYesCustTable.AccountNum
InvoiceCustomerIsExternallyMaintainedYes/No flag showing the customer record is maintained outside the system.Enum
isExternallyMaintained
NoYes

Platform enum: values not in the metadata extract.

NoYesCustTable.IsExternallyMaintained
InvoiceValidFromDate and time from which the address is effective.UtcDateTime
EffectiveDateTime
NoNo (private)LogisticsPostalAddress.ValidFrom
InvoiceValidToDate and time when the address expires.UtcDateTime
ExpirationDateTime
NoNo (private)LogisticsPostalAddress.ValidTo
IsDeliveryAddressOrderSpecificYes/no flag showing whether the delivery address is a one-time address for this order only.Enum
NoYesId
NoYes

Platform enum: values not in the metadata extract.

NoYescomputed
IsDeliveryAddressPrivateShows whether the address is private (Yes or No).Enum
LogisticsIsPrivate
NoYes

Platform enum: values not in the metadata extract.

NoYesLogisticsPostalAddress.IsPrivate
IsInvoiceAddressPrivateShows whether the address is private (Yes or No).Enum
LogisticsIsPrivate
NoYes

Platform enum: values not in the metadata extract.

NoYesLogisticsPostalAddress.IsPrivate
IsOneTimeCustomerYes/no flag showing that the order is for a one-time customer.Enum
OneTimeCustomer
NoYes

Platform enum: values not in the metadata extract.

NoYesSalesTable.OneTimeCustomer
IsSalesProcessingStoppedYes/no flag telling processing to skip the order.Enum
MCROrderStopped
NoYes

Platform enum: values not in the metadata extract.

NoYesSalesTable.MCROrderStopped
LanguageIdLanguage used for the order.String (7)
CustLanguageId
NoYesLanguageTable.LanguageIdSalesTable.LanguageId
OrderCreationDateTimeThe date and time when the record was created.UtcDateTime
CreatedDateTime
NoYesSalesTable.CreatedDateTime
OrderingCustomerAccountNumberUnique customer account number. It identifies the customer record and is the table key.String (20)
CustAccount
NoYesCustTable.AccountNum
OrderingCustomerIsExternallyMaintainedYes/No flag showing the customer record is maintained outside the system.Enum
isExternallyMaintained
NoYes

Platform enum: values not in the metadata extract.

NoYesCustTable.IsExternallyMaintained
OrderResponsiblePersonnelNumberNumber that identifies the worker within the organisation.String (25)
HcmPersonnelNumberId
NoYesHcmWorker.PersonnelNumber
OrderTakerPersonnelNumberNumber that identifies the worker within the organisation.String (25)
HcmPersonnelNumberId
NoYesHcmWorker.PersonnelNumber
OrderTotalAmountOverall total amount of the order.Real
MCRTotalAmount
NoYesSalesOrderTotals.OrderTotalAmount
OrderTotalChargesAmountTotal of the charges on the order.Real
MCRTotalMarkupAmount
NoYesSalesOrderTotals.OrderTotalChargesAmount
OrderTotalDiscountAmountDiscount held at the level of the whole sales order.Real
SalesDiscountAmount
NoYesSalesOrderTotals.OrderTotalDiscountAmount
OrderTotalTaxAmountTotal tax amount for the order.Real
MCRTotalTaxAmount
NoYesSalesOrderTotals.OrderTotalTaxAmount
OrderHeaderTaxAmountSales tax amount held on the order header.Real
TaxAmount
NoYesSalesOrderTotals.OrderHeaderTaxAmount
PaymentTermsBaseDateBase date used for the payment terms.Date
CashDiscBaseDate
NoYesSalesTable.CashDiscBaseDate
PaymentTermsNameTerms of payment for the order.String (100)
CustPaymTermId
NoYesPaymTerm.PaymTermIdSalesTable.Payment
PriceCustomerGroupCodePrice group of the order, linked to the price groups.String
CustPriceGroup
NoYesSalesTable.PriceGroupId
QuotationNumberQuotation number that the order relates to.String (20)
QuotationId
NoYesSalesTable.QuotationId
RequestedReceiptDateDate on which the customer asked to receive the goods.Date
SalesReceiptDateRequested
NoYesSalesTable.ReceiptDateRequested
RequestedShippingDateShip date requested by the customer.Date
SalesShippingDateRequested
NoYesSalesTable.ShippingDateRequested
SalesOrderNameName of the customer on the order.String (60)
SalesName
NoYesSalesTable.SalesName
InvoiceAddressCountryRegionISOCodeTwo-letter ISO code.String (2)
LogisticsAddressCountryRegionISOCode
NoYesLogisticsAddressCountryRegion.ISOcode
SalesOrderNumberSales order number that identifies the order.String (20)
SalesIdBase
NoYesSalesTable.SalesId
SalesOrderOriginCodeOrder origin code showing where the order came from.String
SalesOriginId
NoYesSalesOrigin.OriginIdSalesTable.SalesOriginId
SalesOrderProcessingStatusProcessing status of the sales order, shown as a list of fixed values.Enum
SalesOrderProcessingStatus
  • Active 0
  • Confirmed 1
  • Picked 2
  • PartiallyDelivered 3
  • Delivered 4
  • Invoiced 5
  • PartiallyInvoiced 6
  • Canceled 7
  • DeliveredPartiallyInvoiced 8
NoYescomputed
SalesOrderPromisingMethodMethod used to control delivery dates, such as sales lead time or ATP.Enum
SalesDeliveryDateControlType
  • None 0
  • SalesLeadTime 1
  • ATP 2
  • ATPPlusIssueMargin 3
  • CTP 4
  • FullRunCTP 5
NoYesSalesTable.DeliveryDateControlType
SalesOrderStatusStatus of the order: open, delivered, invoiced or cancelled.Enum
SalesStatus
  • None 0
  • Backorder 1
  • Delivered 2
  • Invoiced 3
  • Canceled 4
NoYesSalesTable.SalesStatus
SalesResponsibleWorker who is responsible for the sale.Int64
WorkerSalesResponsible
NoNo (private)HcmWorker.RecIdSalesTable.WorkerSalesResponsible
SalesTakerWorker who took the order.Int64
SalesTaker
NoNo (private)HcmWorker.RecIdSalesTable.WorkerSalesTaker
TotalDiscountAmountTotal discount amount for the order.Real
SalesDiscountAmount
NoYesSalesOrderTotals.TotalDiscountAmount
URLInternet address on the order.String (255)
URL
NoYesSalesTable.URL
AreTotalsUpdatedShows whether the order totals have been calculated.Enum
SalesTotalsCalculated
NoYes

Platform enum: values not in the metadata extract.

NoYescomputed
SalesOrderOriginTypeInternal type of the origin: not specified, sales order integration or work order integration.Enum
SalesOriginType
  • NotSpecified 0
  • SalesOrderIntegration 1
  • WorkOrderIntegration 2
NoYesSalesOriginInternalType.OriginType
ExternalWorkOrderStatusStatus of the external work order, such as open and scheduled, in progress, closed and posted, or closed and cancelled.Enum
SalesExternalWorkOrderStatus
  • OpenUnscheduled 0
  • OpenScheduled 1
  • OpenInProgress 2
  • OpenCompleted 3
  • ClosedPosted 4
  • ClosedCanceled 5
NoYesSalesTableExternalWorkOrderStatus.ExternalWorkOrderStatus
ProjectIdProject linked to the order.String (20)
ProjId
NoYesProjTable.ProjIdSalesTable.ProjId
SkipCreateAutoChargesYes/no flag to skip the automatic charges for the order.Enum
NoYesId
NoYes

Platform enum: values not in the metadata extract.

NoYescomputed
FixedExchangeRateFixed exchange rate set for the order.Real
SalesFixedExchRate
NoYesSalesTable.FixedExchRate
ReportingCurrencyFixedExchangeRateExchange rate for the reporting currency.Real
CustExchRate
NoYesSalesTable.ReportingCurrencyFixedExchRate
DefaultInvoiceLocationRecIdSystem record ID of the location used as the default invoice address.Int64
LogisticsLocationRecId
NoYescomputed in view
TotalDiscountCustomerGroupCodeTotal discount group applied to the order, linked to a price group.String
CustEndDiscCode
NoYesSalesTable.EndDisc
MultilineDiscountCustomerGroupCodeMultiline discount group for the order, linked to a price group.String
CustMultiLineDiscCode
NoYesSalesTable.MultiLineDisc
LineDiscountCustomerGroupCodeLine discount group that applies to the order, linked to a price group.String
CustLineDiscCode
NoYesSalesTable.LineDisc
SalesOrderIntegrationCreationTypeShows how the order was created through an integration, using fixed values.low confidenceEnum
SalesOrderIntegrationCreationType
  • Unknown 0
  • WinQuote 1
NoYesvirtual

Foreign keys (21)

Each field below points to the key of another table. Join on it in Power BI, or follow the link to an entity that exposes that table.

Need help with SalesOrderHeaderD365SalesEntity in Power BI, Power Automate or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk