Skip to content
NetSuite Reference

transactionline

transactionSubsidiary-scopedLocation-scoped

The line grain of the transaction spine: item, quantity, rate and transaction-currency amounts, plus the subsidiary, location, class and department that scope the line.

Module: TransactionsSubsidiary- and location-scopedHeader: transaction
Grain note

the mainline column separates the header row from the real lines — Oracle's own SuiteQL examples filter mainline = 'T' for header grain, so line-grain analytics take the inverse, mainline = 'F'. Forgetting it double-counts every document.

Notes

This is where subsidiary lives, where createdfrom points at the upstream document, and where quantities are. Amounts here are TRANSACTION currency (foreignamount, netamount, creditforeignamount, debitforeignamount); base-currency amounts are on transactionaccountingline. uniquekey is the line's stable key; id repeats the line identifier.

What the badges mean
master
Data class: what the record holds — master data, transaction documents, control/configuration, or a documented convenience record. NetSuite has no product-family or schema axis, so this is the whole classification.

Structural facts — how the record is partitioned, not a trap by itself

Subsidiary-scoped
The record carries a subsidiary column that partitions its rows, so the generated SQL anchors it. On a few records the column is a multiselect rather than a scalar foreign key — the table notes say which (see the quirks guide).
Location-scoped
The record carries a location column — an org segment in NetSuite before it is a warehouse — and the generated SQL anchors it the same way.

Join & extract hazards — verify before you rely on this

View
A documented convenience record rather than a stored one. Land the records it stands in for instead of assuming it extracts as-is — the table notes say where the rows actually live.
In field listings, the Key chip marks a primary-key field, and the T/F chip marks a check-box column Connect returns as a 'T'/'F' string.

Header & line

transactionline rows join back to their header transaction on the transaction id — one document, many lines.

Record types

The business documents that live in this table. NetSuite stores them all in one table family separated by the type column, so a sales order and an item fulfillment are the same rows under different type values. Oracle publishes no list of those values — read them from your own account with SELECT DISTINCT type FROM transaction.

Fields

19 fields · 3 key

19 fields.

Table fields: position, field name, description, data type, and flags. 19 fields.
#FieldDescriptionTypeFlags
1idLine IDNUMBER
Primary-key field
2transactionParent transaction (internal id)NUMBER
Primary-key field
3uniquekeyStable unique key for the lineNUMBER
Primary-key field
4linesequencenumberLine number as displayedNUMBER
5mainlineHeader row marker — 'T' is the document header, 'F' the real linesVARCHAR
6taxlineTax lineVARCHAR
7subsidiarySubsidiary (internal id) — the OneWorld partition lives here, not on the headerNUMBER
8locationLocation (internal id)NUMBER
9itemItem (internal id)NUMBER
10quantityLine quantityNUMBER
11rateUnit rateNUMBER
12foreignamountLine amount in TRANSACTION currencyNUMBER
13netamountNet amount in transaction currencyNUMBER
14creditforeignamountCredit amount in transaction currencyNUMBER
15debitforeignamountDebit amount in transaction currencyNUMBER
16createdfromUpstream document this line was created from (internal id)NUMBER
17unitsUnit of measure on the line (internal id)NUMBER
18isclosedLine closedVARCHAR
19linelastmodifieddateLine last modified — the line-level incremental watermarkDATE

Field provenance: hand-curated. 3 key fields.

Boilerplate SQL

Starting point for reading the Connect-landed copy of transactionline on Databricks — dates are real DATE/TIMESTAMP columns and need no conversion, and the partition anchors are already in place. The linelastmodifieddate watermark is in place too. Set your Unity Catalog location, schema, and filter values below; they’re substituted into the SQL and the copy button.

Query parameters

8 parameters not filled: <catalog>, <schema>, <subsidiary_id>, <location_id>, <id>, <transaction>, <uniquekey>, <watermark>

-- ============================================================
-- Table  : transactionline — The line grain of the transaction spine: item, quantity, rate and transaction-currency amounts, plus the subsidiary, location, class and department that scope the line.
-- Purpose: Column-selected read of transactionline — auto-generated from field metadata
-- Grain  : One row per id + transaction + uniquekey
-- Caution: the mainline column separates the header row from the real lines — Oracle's own SuiteQL examples filter mainline = 'T' for header grain, so line-grain analytics take the inverse, mainline = 'F'. Forgetting it double-counts every document.
-- Notes  : Auto-generated skeleton for NetSuite data landed in your lakehouse from a SuiteAnalytics Connect (or SuiteQL) extract — it never addresses live NetSuite. Identifiers are lowercase as NetSuite2.com renders them. Select-type columns hold numeric internal ids: BUILTIN.DF() display resolution exists only at extraction time, so decode ids by joining the landed list records; see quirks #display-values. Check-box columns arrive as 'T'/'F' strings; see quirks #tf-booleans.
-- ============================================================
SELECT
  t.id AS "Line ID",
  t.transaction AS "Parent transaction (internal id)",
  t.uniquekey AS "Stable unique key for the line",
  t.linesequencenumber AS "Line number as displayed",
  t.mainline AS "Header row marker — 'T' is the document header, 'F' the real lines",  -- 'T'/'F' string — compare = 'T', or CAST via CASE; see quirks #tf-booleans
  t.taxline AS "Tax line",  -- 'T'/'F' string — compare = 'T', or CAST via CASE; see quirks #tf-booleans
  t.subsidiary AS "Subsidiary (internal id) — the OneWorld partition lives here, not on the header",
  t.location AS "Location (internal id)",
  t.item AS "Item (internal id)",
  t.quantity AS "Line quantity",
  t.rate AS "Unit rate",
  t.foreignamount AS "Line amount in TRANSACTION currency",
  t.netamount AS "Net amount in transaction currency",
  t.creditforeignamount AS "Credit amount in transaction currency",
  t.debitforeignamount AS "Debit amount in transaction currency",
  t.createdfrom AS "Upstream document this line was created from (internal id)",
  t.units AS "Unit of measure on the line (internal id)",
  t.isclosed AS "Line closed",  -- 'T'/'F' string — compare = 'T', or CAST via CASE; see quirks #tf-booleans
  t.linelastmodifieddate AS "Line last modified — the line-level incremental watermark"
FROM <catalog>.<schema>.transactionline t
WHERE
  t.subsidiary = <subsidiary_id>  -- OneWorld partition — see quirks guide #oneworld
  AND t.location = <location_id>  -- location scope — see quirks guide #oneworld
  AND t.mainline = 'F'  -- line grain; 'T' is the document header row — see quirks guide #transaction-spine
  -- AND t.id = <id>
  -- AND t.transaction = <transaction>
  -- AND t.uniquekey = <uniquekey>
  -- AND t.linelastmodifieddate >= DATE '<watermark>'  -- inserts and updates only — deletes never appear here; diff deletedrecord, which is itself blind to line-level deletes (see quirks #deletes)
ORDER BY t.id;

Verified August 2026 · Analytics Browser 2021.1 · corroborated 2025.2

Select columns hold internal ids, not display text — see decoding display values.

Relationships

Diagram of 1-hop neighbors — join details below. Document-link edges are highlighted; they chain one document to the next and are the joins newcomers most often get wrong.

Join details

  • transactiontransactionlineheader line · 1:N
    ON transaction.id = transactionline.transaction
  • transactionlinetransactionaccountinglineforeign key · 1:N
    ON transactionline.transaction = transactionaccountingline.transaction AND transactionline.id = transactionaccountingline.transactionline AND transactionaccountingline.accountingbook = <accounting_book_id> -- TAL duplicates once per accounting book (max 5) and is stated in the subsidiary's base currency; TL is transaction currency — see quirks #tal-and-books
  • transactionlineitemforeign key · N:1
    ON transactionline.item = item.id
  • transactionlinelocationforeign key · N:1
    ON transactionline.location = location.id
  • transactionlinesubsidiaryforeign key · N:1
    ON transactionline.subsidiary = subsidiary.id
  • transactionlinetransactiondocument link · N:1
    ON transactionline.createdfrom = transaction.id
  • nexttransactionlinelinktransactionlinedocument link · N:1
    ON nexttransactionlinelink.previousline = transactionline.id
  • nexttransactionlinelinktransactionlinedocument link · N:1
    ON nexttransactionlinelink.nextline = transactionline.id
  • previoustransactionlinelinktransactionlinedocument link · N:1
    ON previoustransactionlinelink.previousline = transactionline.id
  • previoustransactionlinelinktransactionlinedocument link · N:1
    ON previoustransactionlinelink.nextline = transactionline.id
  • inventoryassignmenttransactionlineforeign key · N:1
    ON inventoryassignment.transactionline = transactionline.id

Browse more Transactions tables

More Transactions 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 Oracle or NetSuite. NetSuite is a registered trademark of Oracle and/or its affiliates.