previoustransactionlinelink
transactionThe backward line-link table: the exact mirror of nexttransactionlinelink, travelling upstream from an invoice line to the sales-order line it originated on.
Same eight column ids as the Next record, with the labels swapped: here previous* is the upstream document being linked to and next* is the line you are standing on. Pick the direction that matches your traversal rather than joining both.
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.
- Subsidiary-scoped
- The record carries a
subsidiarycolumn 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
locationcolumn — an org segment in NetSuite before it is a warehouse — and the generated SQL anchors it the same way. - 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.
Structural facts — how the record is partitioned, not a trap by itself
Join & extract hazards — verify before you rely on this
'T'/'F' string.Fields
8 fields · 4 key
8 fields.
| # | Field | Description | Type | Flags |
|---|---|---|---|---|
| 1 | previousdoc | Upstream document being linked to (internal id) | NUMBER | Primary-key field |
| 2 | previousline | Upstream line being linked to (internal id) | NUMBER | Primary-key field |
| 3 | previoustype | Type of the upstream document | VARCHAR | |
| 4 | nextdoc | The document you are standing on (internal id) | NUMBER | Primary-key field |
| 5 | nextline | The line you are standing on (internal id) | NUMBER | Primary-key field |
| 6 | nexttype | Type of the document you are standing on | VARCHAR | |
| 7 | linktype | Link type (internal id) | NUMBER | |
| 8 | foreignamount | Linked amount in transaction currency | NUMBER |
Field provenance: hand-curated. 4 key fields.
Boilerplate SQL
Starting point for reading the Connect-landed copy of previoustransactionlinelink on Databricks — dates are real DATE/TIMESTAMP columns and need no conversion, and the partition anchors are already in place. This record carries no modification stamp, and the snippet says so where the watermark would otherwise go. Set your Unity Catalog location, schema, and filter values below; they’re substituted into the SQL and the copy button.
6 parameters not filled: <catalog>, <schema>, <previousdoc>, <previousline>, <nextdoc>, <nextline>
-- ============================================================
-- Table : previoustransactionlinelink — The backward line-link table: the exact mirror of nexttransactionlinelink, travelling upstream from an invoice line to the sales-order line it originated on.
-- Purpose: Column-selected read of previoustransactionlinelink — auto-generated from field metadata
-- Grain : One row per previousdoc + previousline + nextdoc + nextline
-- 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.previousdoc AS "Upstream document being linked to (internal id)",
t.previousline AS "Upstream line being linked to (internal id)",
t.nextdoc AS "The document you are standing on (internal id)",
t.nextline AS "The line you are standing on (internal id)",
t.previoustype AS "Type of the upstream document",
t.nexttype AS "Type of the document you are standing on",
t.linktype AS "Link type (internal id)",
t.foreignamount AS "Linked amount in transaction currency"
FROM <catalog>.<schema>.previoustransactionlinelink t
WHERE
1 = 1 -- no partition column on this record; the filters below are optional
-- AND t.previousdoc = <previousdoc>
-- AND t.previousline = <previousline>
-- AND t.nextdoc = <nextdoc>
-- AND t.nextline = <nextline>
-- no lastmodifieddate on this record — there is no watermark column, so incremental extraction must full-refresh it (see quirks #deletes)
ORDER BY t.previousdoc;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
ON previoustransactionlinelink.previousline = transactionline.idON previoustransactionlinelink.nextline = transactionline.idON previoustransactionlinelink.previousdoc = transaction.idON previoustransactionlinelink.nextdoc = transaction.id
More Transactions tables
- salesinvoicedThe invoiced-sales analytics view: the ordered twin plus a posting period, one row per invoiced transaction line with amount, quantity and the estimated cost and gross-profit columns.
- salesorderedThe ordered-sales analytics view: one row per sales transaction line with the amount, quantity, estimated cost and estimated gross profit already computed, alongside the customer, item, and the class/department/location segments.
- transactionThe 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.
- transactionaccountinglineThe accounting projection of a transaction line: base-currency amount, debit, credit and net, per accounting book, with the GL account and audit-number stamps.
- transactionbillingaddressThe billing address stamped on a document: the same fourteen columns as the shipping twin, keyed by the address key the transaction header's billing pointer resolves to.
- transactionlineThe line grain of the transaction spine: item, quantity, rate and transaction-currency amounts, plus the subsidiary, location, class and department that scope the line.