Skip to content
D365 Reference

InventWarehouseOnHandV2Entity

Inventory on-hand by warehouse — aggregated on-hand, reserved, available, and on-order quantities per item variant, site, and warehouse

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 on-hand aggregate; CDM-verified (display name: Inventory on-hand by warehouse V2). Read-only aggregate view over the on-hand data — no site-level sibling could be verified on CDM/Learn, so none is cataloged.

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 : InventWarehouseOnHandV2Entity
-- Purpose: Rebuild InventWarehouseOnHandV2Entity from landed F&O tables — auto-generated from table-entity-map
-- Grain  : One row per InventSum record
-- Tables : InventSum
-- 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
  s.itemid AS "Item the on-hand balance is for",
  s.inventdimid AS "Inventory-dimension combination the balance is aggregated at; join to InventDim to resolve site / warehouse / location"
FROM <catalog>.<schema>.inventsum s
LEFT JOIN <catalog>.<schema>.inventdim id
  ON id.inventdimid = s.inventdimid
 AND id.dataareaid = s.dataareaid
WHERE
  s.dataareaid = '<company>'
ORDER BY s.itemid;

Backing Tables

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

Join details

  • InventSumInventDimInventDim · N:1
    ON inventsum.inventdimid = inventdim.inventdimid AND inventsum.dataareaid = inventdim.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.