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

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

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 WHSWorkLineon 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
-- ============================================================
-- 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;

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

Relationships

1-hop neighbors — click a table to navigate there. 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
  • WHSWorkLineInventTableforeign key · N:1
    ON whsworkline.itemid = inventtable.itemid
  • WHSWorkLineInventDimInventDim · N:1
    ON whsworkline.inventdimid = inventdim.inventdimid
  • WHSWorkLineWHSLoadLineRecId ref · N:1
    ON whsworkline.loadlinerefrecid = whsloadline.recid

Data Entities That Expose This Table