Skip to content
NetSuite Reference

transaction

transaction

The document header for every transaction type NetSuite records — sales orders, purchase orders, fulfillments, receipts, invoices, journals — separated by the type column rather than by table.

Module: TransactionsNo partition column
Grain note

page-attested by absence: this header carries NO subsidiary column, NO quantity, and NO base-currency or debit/credit amounts. Monetary exposure here is transaction-currency ("foreign") totals only — subsidiary and quantities come from transactionline, base-currency debits and credits from transactionaccountingline. `location` does exist on the header, but it is an optional stamp that is null on most documents — filter location at LINE level, on transactionline.location.

Notes

hasSubsidiary is false because the column genuinely is not on the record: subsidiary scoping is a LINE-level property in the analytics source. hasLocation is false for a different reason — the header `location` column exists (and is authored below) but is optional and unset on most rows, so an active anchor on it would silently drop documents; the line-level column is the one to filter on. type values (the discriminator that turns this one table into every document) are not published by Oracle anywhere public — discover them in-account with SELECT DISTINCT type; see quirks #transaction-spine. createdfrom is likewise a line column, not a header one. One disclosed typing asymmetry: the 2021.1 page types both type and status as selects, but this catalog types type as varchar — the legacy Connect Browser typed that column a plain VARCHAR2 — while status follows the default select→number mapping pending a public source that settles its stored representation.

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

transaction is the header for its lines in transactionline.

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

22 fields · 1 key

22 fields.

Table fields: position, field name, description, data type, and flags. 22 fields.
#FieldDescriptionTypeFlags
1idInternal IDNUMBER
Primary-key field
2tranidDocument number as printedVARCHAR
3typeDocument type discriminator — values are discoverable in-account onlyVARCHAR
4recordtypeRecord type as textVARCHAR
5statusDocument status (internal id)NUMBER
6trandateTransaction dateDATE
The record's primary analysis date — a real DATE/TIMESTAMP column, no conversion needed
7createddateDate createdTIMESTAMP
8lastmodifieddateLast modified — the incremental watermarkTIMESTAMP
9duedateDue dateDATE
10closedateDate closedDATE
11entityEntity on the document (internal id)NUMBER
12currencyTransaction currency (internal id)NUMBER
13exchangerateExchange rate stamped on the documentNUMBER
14locationHeader location (internal id)NUMBER
15postingperiodPosting period (internal id) — not the same as trandateNUMBER
16postingDocument posts to the GLVARCHAR
17foreigntotalDocument total in TRANSACTION currency — there is no base-currency total hereNUMBER
18memoMemoVARCHAR
19termsPayment terms (internal id)NUMBER
20paymentmethodPayment method (internal id)NUMBER
21shippingaddressShipping address key (internal id) — resolves to transactionshippingaddress.nkeyNUMBER
22billingaddressBilling address key (internal id) — resolves to transactionbillingaddress.nkeyNUMBER

Field provenance: hand-curated. 1 key field.

Boilerplate SQL

Starting point for reading the Connect-landed copy of transaction on Databricks — dates are real DATE/TIMESTAMP columns and need no conversion, and the partition anchors are already in place. The lastmodifieddate 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

7 parameters not filled: <catalog>, <schema>, <type>, <id>, <DATE_FROM>, <DATE_TO>, <watermark>

-- ============================================================
-- Table  : transaction — The document header for every transaction type NetSuite records — sales orders, purchase orders, fulfillments, receipts, invoices, journals — separated by the type column rather than by table.
-- Purpose: Column-selected read of transaction — auto-generated from field metadata
-- Grain  : One row per id
-- Caution: page-attested by absence: this header carries NO subsidiary column, NO quantity, and NO base-currency or debit/credit amounts. Monetary exposure here is transaction-currency ("foreign") totals only — subsidiary and quantities come from transactionline, base-currency debits and credits from transactionaccountingline. `location` does exist on the header, but it is an optional stamp that is null on most documents — filter location at LINE level, on transactionline.location.
-- 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 "Internal ID",
  t.tranid AS "Document number as printed",
  t.type AS "Document type discriminator — values are discoverable in-account only",
  t.recordtype AS "Record type as text",
  t.status AS "Document status (internal id)",
  t.trandate AS "Transaction date",
  t.createddate AS "Date created",
  t.lastmodifieddate AS "Last modified — the incremental watermark",
  t.duedate AS "Due date",
  t.closedate AS "Date closed",
  t.entity AS "Entity on the document (internal id)",
  t.currency AS "Transaction currency (internal id)",
  t.exchangerate AS "Exchange rate stamped on the document",
  t.location AS "Header location (internal id)",
  t.postingperiod AS "Posting period (internal id) — not the same as trandate",
  t.posting AS "Document posts to the GL",  -- 'T'/'F' string — compare = 'T', or CAST via CASE; see quirks #tf-booleans
  t.foreigntotal AS "Document total in TRANSACTION currency — there is no base-currency total here",
  t.memo AS "Memo",
  t.terms AS "Payment terms (internal id)",
  t.paymentmethod AS "Payment method (internal id)",
  t.shippingaddress AS "Shipping address key (internal id) — resolves to transactionshippingaddress.nkey",
  t.billingaddress AS "Billing address key (internal id) — resolves to transactionbillingaddress.nkey"
FROM <catalog>.<schema>.transaction t
WHERE
  1 = 1  -- no partition column on this record; the filters below are optional
  -- AND t.type = '<type>'  -- discover values in-account: SELECT DISTINCT type
  -- AND t.id = <id>
  -- AND t.trandate >= DATE '<DATE_FROM>'
  -- AND t.trandate <= DATE '<DATE_TO>'
  -- AND t.lastmodifieddate >= TIMESTAMP '<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
  • transactionentityforeign key · N:1
    ON transaction.entity = entity.id
  • transactioncurrencyforeign key · N:1
    ON transaction.currency = currency.id
  • transactionaccountingperiodforeign key · N:1
    ON transaction.postingperiod = accountingperiod.id
  • transactionlocationforeign key · N:1
    ON transaction.location = location.id
  • transactionshipmenttransactionforeign key · N:1
    ON transactionshipment.doc = transaction.id
  • transactiontransactionshippingaddressforeign key · N:1
    ON transaction.shippingaddress = transactionshippingaddress.nkey
  • transactiontransactionbillingaddressforeign key · N:1
    ON transaction.billingaddress = transactionbillingaddress.nkey
  • transactionpaymentmethodforeign key · N:1
    ON transaction.paymentmethod = paymentmethod.id
  • transactiontermforeign key · N:1
    ON transaction.terms = term.id
  • transactionlinetransactiondocument link · N:1
    ON transactionline.createdfrom = transaction.id
  • nexttransactionlinelinktransactiondocument link · N:1
    ON nexttransactionlinelink.previousdoc = transaction.id
  • nexttransactionlinelinktransactiondocument link · N:1
    ON nexttransactionlinelink.nextdoc = transaction.id
  • previoustransactionlinelinktransactiondocument link · N:1
    ON previoustransactionlinelink.previousdoc = transaction.id
  • previoustransactionlinelinktransactiondocument link · N:1
    ON previoustransactionlinelink.nextdoc = transaction.id
  • inventoryassignmenttransactionforeign key · N:1
    ON inventoryassignment.transaction = transaction.id
  • manufacturingoperationtasktransactionforeign key · N:1
    ON manufacturingoperationtask.workorder = transaction.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.