Skip to content
D365 Reference

WHSWorkLine

worksheet line

Warehouse work line — the individual pick and put steps of a work order, with item, location, quantities, and the worker who executed them; the grain for labor and travel analysis

Module: Warehouse ManagementCompany-partitioned (DataAreaId)Header: WHSWorkTable
What the badges mean
main
Table group: how F&O categorizes the table's role — main entity, group/header, transaction, worksheet header, worksheet line, reference, parameter, or framework.
Shared across companies
The table carries no DataAreaId— rows aren’t partitioned per company, so a query never needs (and can’t use) a company filter here (see the quirks guide).
Date-effective
The table carries a ValidFrom/ValidTo effectivity window — a join without a date filter multiplies every key by its history (see the quirks guide).
In field listings, K marks a key field.

Header & line

WHSWorkLine lines join back to their header WHSWorkTable — and the DataAreaId — so a line never fans out across companies.

Fields

15 fields · 2 key

15 fields.

Table fields: key flag, field name, extended data type, description, data type, length, and quirk flags. 15 fields.
KeyFieldEDTDescriptionTypeLengthFlags
KeyWorkIdWorkIdWork order this line belongs tostring
KeyLineNumLineNumLine number within the work order — pick and put steps in execution sequencereal
WorkTypeStep type — pick, put, count, or a custom stepenum
WorkStatusStatus of the individual step (open, in process, closed…)enum
ItemIdItemIdItem handled by the stepstring20
InventDimIdInventDimIdInventory-dimension combination handled by the step; join to InventDim to resolve batch / serial / statusstring25
WMSLocationIdWarehouse location (bin) the step picks from or puts tostring25
QtyWorkQuantity the step is instructed to move, in the work unitreal
QtyRemainQuantity still remaining on the stepreal
UnitIdUnit the work quantity is expressed instring
InventTransIdInventTransIdLot ID of the source document line the step servesstring40
UserIdWarehouse worker who executed the step — the labor-analysis dimensionstring
ZoneIdWarehouse zone of the step's locationstring
LoadLineRefRecIdRecIdRecId of the WHSLoadLine the step fulfills — the join from warehouse execution back to the loadint64
WorkClosedUTCDateTimeWhen the step was completed, stored in UTCdatetime

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading WHSWorkLine on Databricks — enums are decoded, 1900-01-01 dates are wrapped to NULL, and the DataAreaId anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.

Query parameters

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

-- ============================================================
-- Table  : WHSWorkLine Warehouse work line — the individual pick and put steps of a work order, with item, location, quantities, and the worker who executed them; the grain for labor and travel analysis
-- Purpose: Column-selected read of WHSWorkLine — auto-generated from field metadata
-- Grain  : One row per company (dataareaid) + WorkId + LineNum
-- 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. System/audit columns omitted — see the quirks guide.
-- ============================================================
SELECT
  w.workid AS "Work order this line belongs to",
  w.linenum AS "Line number within the work order — pick and put steps in execution sequence",
  w.worktype AS "Step type — pick, put, count, or a custom step",  -- enum: decode w.worktype via GlobalOptionsetMetadata join — see quirks guide #enums
  w.workstatus AS "Status of the individual step (open, in process, closed…)",  -- enum: decode w.workstatus via GlobalOptionsetMetadata join — see quirks guide #enums
  w.itemid AS "Item handled by the step",
  w.inventdimid AS "Inventory-dimension combination handled by the step; join to InventDim to resolve batch / serial / status",
  w.wmslocationid AS "Warehouse location (bin) the step picks from or puts to",
  w.qtywork AS "Quantity the step is instructed to move, in the work unit",
  w.qtyremain AS "Quantity still remaining on the step",
  w.unitid AS "Unit the work quantity is expressed in",
  w.inventtransid AS "Lot ID of the source document line the step serves",
  w.userid AS "Warehouse worker who executed the step — the labor-analysis dimension",
  w.zoneid AS "Warehouse zone of the step's location",
  w.loadlinerefrecid AS "RecId of the WHSLoadLine the step fulfills — the join from warehouse execution back to the load",
  w.workclosedutcdatetime AS "When the step was completed, stored in UTC"  -- stored in UTC
FROM <catalog>.<schema>.whsworkline w
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = w.inventdimid AND id.dataareaid = w.dataareaid
-- Resolve WHSLoadLine (via LoadLineRefRecId): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.whsloadline whs ON whs.recid = w.loadlinerefrecid
WHERE
  w.dataareaid = '<company>'
ORDER BY w.workid;

Verified September 2026

Relationships

Diagram of 1-hop neighbors — join details below. RecId and InventDim edges are highlighted; they’re the joins newcomers most often get wrong.

Join details

  • WHSWorkTableWHSWorkLineheader line · 1:N
    ON whsworktable.workid = whsworkline.workid AND whsworktable.dataareaid = whsworkline.dataareaid
  • WHSWorkLineInventTableforeign key · N:1
    ON whsworkline.itemid = inventtable.itemid AND whsworkline.dataareaid = inventtable.dataareaid
  • WHSWorkLineInventDimInventDim · N:1
    ON whsworkline.inventdimid = inventdim.inventdimid AND whsworkline.dataareaid = inventdim.dataareaid
  • WHSWorkLineWHSLoadLineRecId ref · N:1
    ON whsworkline.loadlinerefrecid = whsloadline.recid

Data Entities That Expose This Table

More Warehouse Management tables

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.