Skip to content
D365 Reference

SalesOrderLineV2Entity

OData: SalesOrderLinesV2

Sales order lines — one record per order line, the line-level export joined to its header

Tables vs entities

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

Notes

V2 line entity; research-confirmed.

Rebuild-from-tables SQL

Databricks SQL

Starting 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.

Query parameters

3 parameters not filled: <catalog>, <schema>, <company>

-- ============================================================
-- Entity : SalesOrderLineV2Entity (OData: SalesOrderLinesV2)
-- Purpose: Rebuild SalesOrderLineV2Entity from landed F&O tables — auto-generated from table-entity-map
-- Grain  : One row per SalesLine record
-- Tables : SalesLine
-- 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
  sl.salesid AS "The sales order this line belongs to",
  sl.linenum AS "Line number within the order",
  sl.name AS "Line description"
FROM <catalog>.<schema>.salesline sl
LEFT JOIN <catalog>.<schema>.salestable so
  ON so.salesid = sl.salesid
 AND so.dataareaid = sl.dataareaid
WHERE
  sl.dataareaid = '<company>'
ORDER BY sl.salesid;

Backing Tables

How these tables connect — join details in the list below.

Join details

  • SalesTableSalesLineheader line · 1:N
    ON salestable.salesid = salesline.salesid AND salestable.dataareaid = salesline.dataareaid

Maintained by Summit Analytics, a supply chain analytics practice. The tools and references are free — the consulting is selective.

Part of the Summit Analytics reference library.

Work with the practice

Not affiliated with or endorsed by Microsoft. Microsoft, Dynamics 365, and Microsoft Fabric are trademarks of the Microsoft group of companies.