Skip to content
D365 Reference

VendInvoiceTrans

transaction

Posted vendor invoice line — one row per invoiced line with quantity, price, and the links back to its purchase order and inventory movements

Header & line

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

Fields

18 fields · 3 key

KeyFieldEDTDescriptionTypeLengthFlags
KeyInvoiceIdInvoiceIdThe invoice this line belongs tostring20
KeyInvoiceDateInvoice date — part of the join back to the headerdate
KeyLineNumLineNumLine number within the invoicereal
PurchIDPurchIdPurchase order the line was invoiced against — note the field really is spelled PurchID, not PurchIdstring20
OrigPurchIdPurchIdOriginal purchase order, kept when delivery schedules split the orderstring20
InventTransIdInventTransIdInventory transaction reference (lot id) linking the line to its inventory movementsstring40
ItemIdItemIdItem invoiced on the linestring20
InventDimIdInventDimIdInventory-dimension combination the line was invoiced against; join to InventDim to resolve site / warehousestring25
NameLine descriptionstring60
QtyQuantity invoicedreal
PurchUnitPurchase unit of measurestring10
PurchPriceUnit price in the invoice currencyreal
LineAmountNet line amount in the invoice currencyreal
CurrencyCodeInvoice currencystring3
DiscAmountLine discount amountreal
DiscPercentLine discount percentagereal
InternalInvoiceIdInternal invoice number, shared with the headerstring20
LedgerDimensionRecIdRecId of the ledger account combination the line posted to (DimensionAttributeValueCombination)int64

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading VendInvoiceTranson 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  : VendInvoiceTrans Posted vendor invoice line — one row per invoiced line with quantity, price, and the links back to its purchase order and inventory movements
-- Purpose: Column-selected read of VendInvoiceTrans — auto-generated from field metadata
-- Grain  : One row per company (dataareaid) + InvoiceId + InvoiceDate + 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
  v.invoiceid AS "The invoice this line belongs to",
  v.invoicedate AS "Invoice date — part of the join back to the header",
  v.linenum AS "Line number within the invoice",
  v.purchid AS "Purchase order the line was invoiced against — note the field really is spelled PurchID, not PurchId",
  v.origpurchid AS "Original purchase order, kept when delivery schedules split the order",
  v.inventtransid AS "Inventory transaction reference (lot id) linking the line to its inventory movements",
  v.itemid AS "Item invoiced on the line",
  v.inventdimid AS "Inventory-dimension combination the line was invoiced against; join to InventDim to resolve site / warehouse",
  v.name AS "Line description",
  v.qty AS "Quantity invoiced",
  v.purchunit AS "Purchase unit of measure",
  v.purchprice AS "Unit price in the invoice currency",
  v.lineamount AS "Net line amount in the invoice currency",
  v.currencycode AS "Invoice currency",
  v.discamount AS "Line discount amount",
  v.discpercent AS "Line discount percentage",
  v.internalinvoiceid AS "Internal invoice number, shared with the header",
  v.ledgerdimension AS "RecId of the ledger account combination the line posted to (DimensionAttributeValueCombination)"
FROM <catalog>.<schema>.vendinvoicetrans v
-- Dimension expansion: uncomment to resolve site / warehouse / location / batch
-- LEFT JOIN <catalog>.<schema>.inventdim id ON id.inventdimid = v.inventdimid AND id.dataareaid = v.dataareaid
WHERE
  v.dataareaid = '<company>'
ORDER BY v.invoiceid;

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

  • VendInvoiceJourVendInvoiceTransheader line · 1:N
    ON vendinvoicejour.invoiceid = vendinvoicetrans.invoiceid
  • VendInvoiceTransInventTableforeign key · N:1
    ON vendinvoicetrans.itemid = inventtable.itemid
  • VendInvoiceTransInventDimInventDim · N:1
    ON vendinvoicetrans.inventdimid = inventdim.inventdimid

Data Entities That Expose This Table

The standard VendorInvoiceLine entity exposes pending invoice lines, not this posted journal — land the raw table.