Data entity
SalesInvoiceHeaderV4Entity
Read-only list of sales invoice headers, version 4. It is keyed by invoice number, invoice date and voucher. It comes from the customer invoice journal and adds sales order, worker and address details. It includes sales tax, cash discount, total discount and line discount amounts.
- Entity name
SalesInvoiceHeaderV4Entity- Public entity name
SalesInvoiceHeaderV4- OData collection
SalesInvoiceHeadersV4- Category
Document- Module
Accounts receivable- Read-only
Yes- Data management enabled
Yes- Configuration key
LogisticsBasic- Keys
InvoiceNumber, InvoiceDate, LedgerVoucher- Staging table
SalesInvoiceHeaderV4Staging
Use it in Power BI and Power Platform
- OData URL
https://<environment>/data/SalesInvoiceHeadersV4- Dataverse virtual table
mserp_salesinvoiceheaderv4entity. 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
CustInvoiceJour· root · read-onlySalesTable· OuterJoin toCustInvoiceJourHcmWorker· OuterJoin toSalesTableLogisticsPostalAddress· OuterJoin toCustInvoiceJourLogisticsAddressCountryRegion· OuterJoin toLogisticsPostalAddress· read-only
Fields (29)
| Field and description | Type / EDT / enum | Mandatory | OData / Dataverse | References | Lineage root |
|---|---|---|---|---|---|
InvoiceNumberIdentifier of the customer invoice. | String (20)CustInvoiceId | No | Yes | CustInvoiceJour.InvoiceId | |
InvoiceDateDate of the invoice. | DateTransDate | Yes | Yes | CustInvoiceJour.InvoiceDate | |
ContactPersonIdContact person for the order, linked to the contacts. | String (20)ContactPersonId | No | Yes | ContactPerson.ContactPersonId | SalesTable.ContactPersonId |
CustomersOrderReferenceReference text supplied by the customer. | String (60)CustRef | No | Yes | SalesTable.CustomerRef | |
DeliveryModeCodeMode of delivery for the order. | StringCustDlvModeId | No | Yes | DlvMode.Code | SalesTable.DlvMode |
DeliveryTermsCodeTerms of delivery for the order. | StringCustDlvTermId | No | Yes | DlvTerm.Code | SalesTable.DlvTerm |
PaymentTermsNameTerms of payment for the order. | String (100)CustPaymTermId | No | Yes | PaymTerm.PaymTermId | SalesTable.Payment |
TotalInvoiceAmountTotal invoice amount in invoice currency. | RealAmountCur | No | Yes | CustInvoiceJour.InvoiceAmount | |
CurrencyCodeCurrency of the invoice. | String (3)CustCurrencyCode | Yes | Yes | Currency.CurrencyCode | CustInvoiceJour.CurrencyCode |
TotalTaxAmountSales tax amount, in invoice currency. | RealTaxAmountCur | No | Yes | CustInvoiceJour.SumTax | |
TotalChargeAmountTotal charges on the invoice, in invoice currency. | RealMarkupSumSales | No | Yes | CustInvoiceJour.SumMarkup | |
TotalDiscountCustomerGroupCodeTotal discount amount at order header level, in invoice currency. | RealSalesEndDiscAmount | No | Yes | CustInvoiceJour.EndDisc | |
InvoiceCustomerAccountNumberCustomer account that receives the invoice. | String (20)CustInvoiceAccount | Yes | Yes | CustTable.AccountNum | CustInvoiceJour.InvoiceAccount |
SalesOrderNumberSales order number that identifies the order. | String (20)SalesIdBase | Yes | Yes | SalesTable.SalesId | |
InvoiceAddressStateState or province code of the address. | StringLogisticsAddressStateId | No | Yes | LogisticsAddressCounty.StateIdLogisticsAddressState.StateId | LogisticsPostalAddress.State |
InvoiceAddressStreetStreet name of the address. | String (250)LogisticsAddressStreet | No | Yes | LogisticsPostalAddress.Street | |
InvoiceAddressStreetNumberStreet or house number. | String (20)LogisticsAddressStreetNumber | No | Yes | LogisticsPostalAddress.StreetNumber | |
InvoiceAddressZipCodeZIP or postal code, as text. | StringLogisticsAddressZipCodeId | No | Yes | LogisticsPostalAddress.ZipCode | |
InvoiceAddressCityName of the city, as text. | String (60)LogisticsAddressCityName | No | Yes | LogisticsPostalAddress.City | |
InvoiceAddressCountryRegionIdThe country or region of the address. | StringLogisticsAddressCountryRegionId | Yes | Yes | LogisticsAddressCountryRegion.CountryRegionId | LogisticsPostalAddress.CountryRegionId |
SalesOrderResponsiblePersonnelNumberNumber that identifies the worker within the organisation. | String (25)HcmPersonnelNumberId | No | Yes | HcmWorker.PersonnelNumber | |
SalesOrderOriginCodeOrder origin code showing where the order came from. | StringSalesOriginId | No | Yes | SalesOrigin.OriginId | SalesTable.SalesOriginId |
LedgerVoucherVoucher number linked to the invoice. | String (20)Voucher | No | Yes | CustInvoiceJour.LedgerVoucher | |
InvoiceAddressRecIdA unique number that the system gives to every record. Other tables often use it to point to this record. | Int64RecId | No | Yes | LogisticsPostalAddress.RecId | |
InvoiceAddressCountryRegionISOCodeTwo-letter ISO code. | String (2)LogisticsAddressCountryRegionISOCode | No | Yes | LogisticsAddressCountryRegion.ISOcode | |
InvoiceHeaderTaxAmountSales tax amount at header level. | RealTaxAmountCur | No | Yes | CustInvoiceJour.HeaderTax | |
CashDiscountCash discount amount on the invoice. | RealCustCashDiscAmount | No | Yes | CustInvoiceJour.CashDisc | |
EndDiscountTotal discount amount at order header level, in invoice currency. | RealSalesEndDiscAmount | No | Yes | CustInvoiceJour.EndDisc | |
TotalLineDiscountTotal of line discounts, in invoice currency. | RealSalesSumLineDiscAmount | No | Yes | CustInvoiceJour.SumLineDisc |
Foreign keys (10)
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.
ContactPersonId→ContactPerson.ContactPersonId(key of ContactPerson)Many SalesTable records → zero or one ContactPerson record
ContactPerson details: see smmContactPersonV2Entity, smmContactPersonCDSV2Entity, BusinessDocumentSalesInvoiceBaseEntity
DeliveryModeCode→DlvMode.Code(key of DlvMode)Many SalesTable records → zero or one DlvMode record
DlvMode details: see DlvDeliveryModeEntity, RetailDeliveryModeAddressLineEntity, RetailDeliveryModeChannelLineEntity
DeliveryTermsCode→DlvTerm.Code(key of DlvTerm)Many SalesTable records → zero or one DlvTerm record
DlvTerm details: see DeliveryTermsEntity, VRMDeliveryTermsEntity
PaymentTermsName→PaymTerm.PaymTermId(key of PaymTerm)Many SalesTable records → zero or one PaymTerm record
PaymTerm details: see PaymentTermEntity, CredManPaymTermRankEntity, TaxWithholdSettlementPeriodEntity
CurrencyCode→Currency.CurrencyCode(key of Currency)Many CustInvoiceJour records → exactly one Currency record
Currency details: see CurrencyNonISOEntity, DenominationEntity, CashDueAnnouncementJournalEntity
InvoiceCustomerAccountNumber→CustTable.AccountNum(key of CustTable)Many CustInvoiceJour records → exactly one CustTable record
CustTable details: see CustCustomerV3Entity, CustFoundationExtendedEntity, CustFoundationEntity
InvoiceAddressState→LogisticsAddressCounty.StateId(key of LogisticsAddressCounty)Join on all of:
InvoiceAddressState=LogisticsAddressCounty.StateId,InvoiceAddressCountryRegionId=LogisticsAddressCounty.CountryRegionId,County(table field, not in this entity) =LogisticsAddressCounty.CountyIdMany LogisticsPostalAddress records → zero or one LogisticsAddressCounty record
LogisticsAddressCounty details: see LogisticsAddressCountyEntity, VRMLogisticsAddressCountyEntity
InvoiceAddressState→LogisticsAddressState.StateId(key of LogisticsAddressState)Join on all of:
InvoiceAddressState=LogisticsAddressState.StateId,InvoiceAddressCountryRegionId=LogisticsAddressState.CountryRegionIdMany LogisticsPostalAddress records → zero or one LogisticsAddressState record
LogisticsAddressState details: see LogisticsAddressStateEntity, PayrollEmployerTaxRegionEntity, StateHolidayEntity
InvoiceAddressCountryRegionId→LogisticsAddressCountryRegion.CountryRegionId(key of LogisticsAddressCountryRegion)Many LogisticsPostalAddress records → exactly one LogisticsAddressCountryRegion record
LogisticsAddressCountryRegion details: see ElectronicTaxICPDeclarationEntity, LogisticsAddressCountryRegionEntity, PaymentCalendarEntity
SalesOrderOriginCode→SalesOrigin.OriginId(key of SalesOrigin)Many SalesTable records → zero or one SalesOrigin record
SalesOrigin details: see SalesOrderOriginEntity
Need help with SalesInvoiceHeaderV4Entity in Power BI, Power Automate or a migration? Talk to Dr Dynamics.