SalesInvoiceLineV2Entity
Sales invoice lines — one record per posted invoice line including inventory-related fields, the line-level export for invoiced revenue
This entity is an export-shaped view over the tables below. When you land raw F&O tables instead of the entity, the SQL further down rebuilds it — joining the backing tables on their keys and DataAreaId. When to land tables vs entities →
V2 line entity; CDM-confirmed with backing table CustInvoiceTrans (learn.microsoft.com/en-us/common-data-model/schema/core/operationscommon/entities/finance/accountsreceivable/salesinvoicelinev2entity); pairs with SalesInvoiceHeaderV2Entity.
Rebuild-from-tables SQL
Databricks SQLStarting point for reconstructing this entity from landed tables — the backing tables joined on their keys and DataAreaId. Set your Unity Catalog location, company, and filter values below.
-- ============================================================
-- Entity : SalesInvoiceLineV2Entity
-- Purpose: Rebuild SalesInvoiceLineV2Entity from landed F&O tables — auto-generated from table-entity-map
-- Grain : One row per CustInvoiceTrans record
-- Tables : CustInvoiceTrans
-- Notes : Auto-generated skeleton for Synapse Link / Fabric Link-landed F&O data (lowercase column names). Enums decoded inline where verified; datetimes stored in UTC; 1900-01-01 dates are sentinels mapped to NULL. Company-partitioned tables are joined on DataAreaId to prevent cross-company fan-out. System/audit columns omitted — see the quirks guide.
-- ============================================================
SELECT
h.invoiceid AS "Invoice this line belongs to; joins to CustInvoiceJour together with InvoiceDate, numberSequenceGroup, and SalesId",
h.invoicedate AS "Posting date of the invoice, repeated on the line; part of the composite key and the line-level analysis date",
h.numbersequencegroup AS "Number-sequence group of the invoice; part of the composite key (often blank)",
h.salesid AS "Sales order the invoiced line came from; part of the composite key",
h.linenum AS "Line number within the invoice",
h.name AS "Line description as printed on the invoice"
FROM <catalog>.<schema>.custinvoicetrans h
WHERE
h.dataareaid = '<company>'
ORDER BY h.invoiceid;3 parameters not filled: <catalog>, <schema>, <company>