Skip to content
D365 Reference

InventJournalTrans

worksheet line

Inventory journal line — one row per item movement in a journal, with quantity, cost, counted figures, and the dimension combination it posts against

Module: InventoryCompany-partitioned (DataAreaId)Header: InventJournalTable
Notes

InventOnHand and Counted are the expected/counted pair on counting journals. TransDate is a plain date, not a datetime.

Header & line

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

Fields

22 fields · 2 key

KeyFieldEDTDescriptionTypeLengthFlags
KeyJournalIdInventJournalIdThe journal this line belongs tostring
KeyLineNumLineNumLine number within the journalreal
TransDatePosting date of the line — the primary analysis date (a plain date, not a datetime)date
ItemIdItemIdItem the line moves, adjusts, or countsstring
InventDimIdInventDimIdInventory-dimension combination the line posts against; join to InventDim to resolve site / warehouse / batchstring
JournalTypeJournal type copied down from the header, so lines can be filtered without a joinenum
QtyQuantity posted by the line, signed (negative for issues)real
CostAmountCost amount of the line in company currencyreal
CostPriceUnit cost price used for the linereal
PriceUnitNumber of units the cost price applies to (price per 1, 100, 1000…)real
CostMarkupCharge amount added on top of the cost pricereal
SalesAmountSales amount for the line, where the journal type carries onereal
InventOnHandExpected on-hand quantity at counting time — compare with Counted for count variancereal
CountedQuantity actually counted on a counting journal linereal
CountingReasonCodeReason code recorded for the count differencestring
VoucherLedger voucher the line posted understring
InventTransIdInventTransIdTransaction reference linking the line to its InventTransOrigin and inventory transactionsstring
ToInventDimIdInventDimIdDestination dimension combination on transfer journal lines (from-side lives in InventDimId)string
ToInventTransIdInventTransIdTransaction reference of the destination side of a transfer linestring
DefaultDimensionRecIdRecId of the line's financial-dimension value set in DimensionAttributeValueSetint64
ReleaseDateDate a blocked line is released for posting; unset rows carry the 1900-01-01 sentineldate
UnitUnit of measure the line quantity is entered instring

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading InventJournalTranson 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  : InventJournalTrans Inventory journal line — one row per item movement in a journal, with quantity, cost, counted figures, and the dimension combination it posts against
-- Purpose: Column-selected read of InventJournalTrans — auto-generated from field metadata
-- Grain  : One row per company (dataareaid) + JournalId + 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
  i.journalid AS "The journal this line belongs to",
  i.linenum AS "Line number within the journal",
  i.transdate AS "Posting date of the line — the primary analysis date (a plain date, not a datetime)",
  i.itemid AS "Item the line moves, adjusts, or counts",
  i.inventdimid AS "Inventory-dimension combination the line posts against; join to InventDim to resolve site / warehouse / batch",
  i.journaltype AS "Journal type copied down from the header, so lines can be filtered without a join",  -- enum: decode i.journaltype via GlobalOptionsetMetadata join — see quirks guide #enums
  i.qty AS "Quantity posted by the line, signed (negative for issues)",
  i.costamount AS "Cost amount of the line in company currency",
  i.costprice AS "Unit cost price used for the line",
  i.priceunit AS "Number of units the cost price applies to (price per 1, 100, 1000…)",
  i.costmarkup AS "Charge amount added on top of the cost price",
  i.salesamount AS "Sales amount for the line, where the journal type carries one",
  i.inventonhand AS "Expected on-hand quantity at counting time — compare with Counted for count variance",
  i.counted AS "Quantity actually counted on a counting journal line",
  i.countingreasoncode AS "Reason code recorded for the count difference",
  i.voucher AS "Ledger voucher the line posted under",
  i.inventtransid AS "Transaction reference linking the line to its InventTransOrigin and inventory transactions",
  i.toinventdimid AS "Destination dimension combination on transfer journal lines (from-side lives in InventDimId)",
  i.toinventtransid AS "Transaction reference of the destination side of a transfer line",
  i.defaultdimension AS "RecId of the line's financial-dimension value set in DimensionAttributeValueSet",
  CASE WHEN CAST(i.releasedate AS DATE) = DATE '1900-01-01' THEN NULL ELSE CAST(i.releasedate AS DATE) END AS "Date a blocked line is released for posting; unset rows carry the 1900-01-01 sentinel",  -- 1900-01-01 sentinel → NULL
  i.unit AS "Unit of measure the line quantity is entered in"
FROM <catalog>.<schema>.inventjournaltrans i
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = i.inventdimid AND id.dataareaid = i.dataareaid
-- Resolve DimensionAttributeValueSet (via DefaultDimension): uncomment to join on its RecId surrogate key
-- LEFT JOIN <catalog>.<schema>.dimensionattributevalueset dim ON dim.recid = i.defaultdimension
WHERE
  i.dataareaid = '<company>'
  -- AND i.transdate >= '<DATE_FROM>'  -- yyyy-MM-dd (UTC)
  -- AND i.transdate <= '<DATE_TO>'  -- yyyy-MM-dd (UTC)
ORDER BY i.journalid;

5 parameters not filled: <catalog>, <schema>, <company>, <DATE_FROM>, <DATE_TO>

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

  • InventJournalTableInventJournalTransheader line · 1:N
    ON inventjournaltable.journalid = inventjournaltrans.journalid
  • InventJournalTransInventTableforeign key · N:1
    ON inventjournaltrans.itemid = inventtable.itemid
  • InventJournalTransInventDimInventDim · N:1
    ON inventjournaltrans.inventdimid = inventdim.inventdimid
  • InventJournalTransDimensionAttributeValueSetRecId ref · N:1
    ON inventjournaltrans.defaultdimension = dimensionattributevalueset.recid

Data Entities That Expose This Table

No data-entity mappings populated for this table yet.