A SuiteQL Balance Sheet that ties to NetSuite
A guarded NetSuite SuiteQL Balance Sheet query on TransactionAccountingLine with Retained Earnings and YTD Net Income, live-verified and footed to zero.
Frontier · December 4, 2026
An applied guide for the controller or FP&A analyst rebuilding a NetSuite Balance Sheet in SuiteQL — or auditing an AI-generated query.
The short answer. To build a NetSuite Balance Sheet in SuiteQL that balances and ties to the standard report, query Transaction → TransactionLine → TransactionAccountingLine (joined on both transaction and transactionline), join Account, AccountingPeriod, Subsidiary, and Currency, enforce four GL guards (tal.posting = 'T', tal.accountingbook = 1, cumulative base-period cutoff ap.isposting = 'T' AND ap.isquarter = 'F' AND ap.isyear = 'F' AND ap.enddate <= as_of, and explicit debit/credit sign math grouped by tl.subsidiary and c.symbol), and synthesize the two equity lines NetSuite computes rather than posts: prior fiscal years' P&L rolled into Retained Earnings and current fiscal year-to-date P&L rolled into Net Income. On a multi-currency OneWorld consolidation, translate each account by its consolidated rate type (Current, Historical, or monthly Average) and carry Cumulative Translation Adjustment (CTA) as the balancing line.
Most SuiteQL Balance Sheet snippets online — and most first-draft queries an AI assistant writes — filter only to balance-sheet account types, filter on t.trandate (or a non-existent t.enddate), omit tal.accountingbook = 1, or sum raw tal.amount across subsidiaries in different currencies. Even when the query runs without an error, assets do not equal liabilities plus equity. Below is the complete guarded query, live read-only measurements from our NetSuite demo ledger that foot to $0.00 per subsidiary, and a constructed OneWorld consolidation reconciled to zero.
The SuiteQL Balance Sheet query
This query returns a complete base-currency Balance Sheet per subsidiary as of 2026-10-31 for a calendar fiscal year starting 2026-01-01 (replace both dates with your target posting period end date and current fiscal year start date). It returns every non-zero asset, liability, and posted equity account alongside the two computed equity rows — prior years' net income (Retained Earnings) and current fiscal year-to-date net income (Net Income) — and orders explicitly rather than relying on SuiteQL's default sort order.
SELECT
tl.subsidiary AS subsidiary_id,
s.name AS subsidiary,
c.symbol AS currency,
CASE
WHEN a.accttype IN (
'Bank', 'AcctRec', 'OthCurrAsset', 'FixedAsset',
'OthAsset', 'DeferExpense', 'UnbilledRec'
) THEN '1_assets'
WHEN a.accttype IN (
'AcctPay', 'CredCard', 'OthCurrLiab', 'LongTermLiab', 'DeferRevenue'
) THEN '2_liabilities'
WHEN a.accttype = 'Equity'
THEN '3_equity_posted'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.enddate < TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN '4_retained_earnings_prior_pl'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.startdate >= TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN '5_net_income_ytd'
END AS section,
CASE
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.enddate < TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN 'Retained Earnings (Prior Years Net Income)'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.startdate >= TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN 'Net Income (Current Fiscal Year to Date)'
ELSE a.fullname
END AS line_item,
ROUND(SUM(
CASE
WHEN a.accttype IN (
'Bank', 'AcctRec', 'OthCurrAsset', 'FixedAsset',
'OthAsset', 'DeferExpense', 'UnbilledRec'
) THEN NVL(tal.debit, 0) - NVL(tal.credit, 0)
ELSE NVL(tal.credit, 0) - NVL(tal.debit, 0)
END
), 2) AS balance
FROM transaction t
JOIN transactionline tl ON t.id = tl.transaction
JOIN transactionaccountingline tal
ON tl.transaction = tal.transaction
AND tl.id = tal.transactionline
JOIN account a ON tal.account = a.id
JOIN accountingperiod ap ON t.postingperiod = ap.id
JOIN subsidiary s ON tl.subsidiary = s.id
JOIN currency c ON s.currency = c.id
WHERE tal.posting = 'T'
AND tal.accountingbook = 1
AND a.issummary = 'F'
AND a.accttype IN (
'Bank', 'AcctRec', 'OthCurrAsset', 'FixedAsset', 'OthAsset', 'DeferExpense', 'UnbilledRec',
'AcctPay', 'CredCard', 'OthCurrLiab', 'LongTermLiab', 'DeferRevenue',
'Equity',
'Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense'
)
AND ap.isposting = 'T'
AND ap.isquarter = 'F'
AND ap.isyear = 'F'
AND ap.enddate <= TO_DATE('2026-10-31', 'YYYY-MM-DD')
GROUP BY
tl.subsidiary,
s.name,
c.symbol,
CASE
WHEN a.accttype IN (
'Bank', 'AcctRec', 'OthCurrAsset', 'FixedAsset',
'OthAsset', 'DeferExpense', 'UnbilledRec'
) THEN '1_assets'
WHEN a.accttype IN (
'AcctPay', 'CredCard', 'OthCurrLiab', 'LongTermLiab', 'DeferRevenue'
) THEN '2_liabilities'
WHEN a.accttype = 'Equity'
THEN '3_equity_posted'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.enddate < TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN '4_retained_earnings_prior_pl'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.startdate >= TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN '5_net_income_ytd'
END,
CASE
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.enddate < TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN 'Retained Earnings (Prior Years Net Income)'
WHEN a.accttype IN ('Income', 'COGS', 'Expense', 'OthIncome', 'OthExpense')
AND ap.startdate >= TO_DATE('2026-01-01', 'YYYY-MM-DD')
THEN 'Net Income (Current Fiscal Year to Date)'
ELSE a.fullname
END
HAVING ROUND(SUM(
CASE
WHEN a.accttype IN (
'Bank', 'AcctRec', 'OthCurrAsset', 'FixedAsset',
'OthAsset', 'DeferExpense', 'UnbilledRec'
) THEN NVL(tal.debit, 0) - NVL(tal.credit, 0)
ELSE NVL(tal.credit, 0) - NVL(tal.debit, 0)
END
), 2) <> 0
ORDER BY tl.subsidiary, 4, 5
Two structural rules anchor the query before the five guards run:
- Three-table join path (
t→tl→tal). Oracle documents that joiningTransaction > Transaction Line > Transaction Accounting Lineprevents the increased data duplication that occurs if you joinTransaction > Transaction Accounting Linedirectly (Joining Transaction Line and Transaction Accounting Line). Joining on bothtl.transaction = tal.transactionandtl.id = tal.transactionlinematches each accounting line to its exact transaction line and bringstl.subsidiaryonto the row, sinceTransactionAccountingLinecarries no subsidiary column. - Detail posting accounts only (
a.issummary = 'F'). Oracle defines summary accounts as non-posting parent accounts created for reporting rollups (Creating Accounts). Filteringa.issummary = 'F'and naming the standard asset, liability, equity, and P&L account types excludes statistical and non-posting accounts cleanly.
Five guards that make a SuiteQL Balance Sheet balance and tie
- Synthesize Retained Earnings and current-year Net Income from P&L accounts — and guard against Period End Journals. Under NetSuite's automatic year-end close, "you're not required to make journal entries to close out the income statement to retained earnings" because "NetSuite doesn't post the balance to retained earnings" — posting it "would zero the past income statements and prevent them from being viewed" (Year-End Closing). Instead, "Net income from prior fiscal year is displayed in the retained earnings account", the standard report adds "Net Income (referenced row from Income Statement)" (Balance Sheet Report), and "the retained earnings account and the net income account together make up your cumulative retained earnings balance at any point in time" (Year-End Closing). In SuiteQL, sum all five P&L account types (
Income,COGS,Expense,OthIncome,OthExpense) withap.enddate < current_fy_startinto Retained Earnings (combining with any direct journals posted to the Retained Earnings account itself), and sum P&L accounts fromap.startdate >= current_fy_startthrough the as-of period end into Net Income. One caveat: if a subsidiary has Period End Journal Entries enabled, NetSuite posts closing journals that "moves net income into retained earnings" and consolidation journals that include CTA (Period End Journal Entries), whereas standard financial reports ignore them ("have no impact on standard reports", Financial Reports with Period End Journals). Exclude period end journals when tying to the standard Balance Sheet, or your query double-counts both closed earnings and CTA. tal.posting = 'T'— keep posting lines only. Oracle defines non-posting transactions as records that do not impact the general ledger, including purchase orders, sales orders, and return authorizations (Working with Transactions). Because a Balance Sheet is cumulative from inception, omittingtal.posting = 'T'pulls every historical non-posting Purchase Order and Sales Order line sitting inTransactionAccountingLinestraight into inventory, payables, and receivables.tal.accountingbook = 1— isolate one accounting book. When Multi-Book Accounting is enabled, Oracle notes that "each transaction accounting line stores data for each accounting book in your NetSuite account" and advises filtering on the accounting book field so only one book is included (Joining Transaction Line and Transaction Accounting Line). Book-generic transactions are "created and shared across all accounting books" (Book-Generic and Book-Specific Records), while adjustment-only secondary books store period-end adjustments in a separate book (Adjustment-Only Books Overview). Saved searches default to the primary book (Reports, KPIs, and Saved Searches in Multi-Book Accounting); SuiteQL does not. Filtertal.accountingbook = 1directly ontal(swap in your book ID for a secondary book) rather than joining theaccountingbooktable, which many read-only API roles cannot query.ap.isposting = 'T' AND ap.isquarter = 'F' AND ap.isyear = 'F'withap.enddate <= as_of— cumulative posting-period cutoff. Oracle distinguishes report date filters from period filters: filtering by date selects by transaction date, while filtering by period selects by posting period (How can I filter report results by periods or dates). Whenever Allow Transaction Date Outside of Posting Period is set to Warn or Allow (General Accounting Preferences), filtering ont.trandateshifts cutoff balances across months. JoiningAccountingPeriodont.postingperiodwithap.enddate <= TO_DATE(...)matches NetSuite's as-of period boundary (note thatt.enddatedoes not exist onTransaction), and the three base-period flags exclude quarter and fiscal-year summary rows (Setting Up Single Accounting Periods).- Explicit debit/credit sign math,
c.symbolcurrency separation, and OneWorld rate types + CTA. Becausetal.debitandtal.creditare mutually exclusive (one is always null),NVL(tal.debit, 0) - NVL(tal.credit, 0)for asset accounts andNVL(tal.credit, 0) - NVL(tal.debit, 0)for liability, equity, and P&L accounts prints every section in standard Balance Sheet sign convention without depending ontal.amount's sign behavior. BecauseTransactionAccountingLine"stores monetary values in the base currency of the subsidiary assigned to the transaction" (Joining Transaction Line and Transaction Accounting Line), always group bytl.subsidiaryandc.symbol. To consolidate multiple currencies into a parent subsidiary, include elimination subsidiaries (Subsidiary Context for Reports) and translate each account at its consolidated exchange rate type — by default Current "for all balance sheet accounts other than equity accounts", Historical "for all equity accounts", and Average month by month "to translate accounts in the income statement and to build retained earnings" (Consolidated Exchange Rate Types; Consolidated Exchange Rates on Reports; BUILTIN.CONSOLIDATE). You can inspect each account's assigned rate type directly fromaccount.generalratein SuiteQL. Because assets, liabilities, equity, and earnings translate at different rates, consolidated balance sheets "use a special account called Cumulative Translation Adjustment (CTA) to achieve balance when there is more than one currency" (Balance Sheet Report), and "The amount you see in consolidated reports for CTA is calculated dynamically, not posted to the account" (CTA Overview).
Measured on our NetSuite demo ledger
Eleven read-only SuiteQL runs against our NetSuite demo ledger (TD3136833, executed as customrole_nsgpt_api_reader, logged verbatim in the packet, zero customer data, zero truncation across every query) demonstrate the exact Balance Sheet tie-out and what breaks when guards are omitted:
| Demo subsidiary (as of 31 Oct 2026, book 1) | Currency | Assets | Liabilities | Posted equity | Prior-year P&L (Retained Earnings) | FY2026 YTD P&L (Net Income) | Liabilities + total equity | Difference |
|---|---|---|---|---|---|---|---|---|
Subsidiary 1 (id 2) |
USD | 3,775,546.40 | 1,105,265.89 | 1,649,411.22 | 520,927.11 | 499,942.18 | 3,775,546.40 | 0.00 |
Subsidiary 2 (id 3) |
USD | 2,213,324.41 | 533,869.99 | 993,971.61 | 350,827.47 | 334,655.34 | 2,213,324.41 | 0.00 |
xElim (id 4) |
USD | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
| Combined visible USD subsidiaries | USD | 5,988,870.81 | 1,639,135.88 | 2,643,382.83 | 871,754.58 | 834,597.52 | 5,988,870.81 | 0.00 |
Logged read-only SuiteQL results on demo account TD3136833 through October 31, 2026 (FY 2026 runs 2026-01-01 to 2026-12-31). The detail query returned 35 non-zero Balance Sheet and synthetic equity rows across 41,009 posting lines (28,918 on Balance Sheet accounts and 12,091 on P&L accounts).
Four concrete measurements stand out on that live ledger:
- Zero postings exist on Retained Earnings: All
50postedEquitylines through October 31, 2026 (28on Subsidiary 1 totaling1,649,411.22;22on Subsidiary 2 totaling993,971.61) hit3510 Capital Stock. Summing only Balance Sheet accounts leaves Subsidiary 1 out of balance by1,020,869.29, Subsidiary 2 out of balance by685,482.81, and the combined USD total out of balance by1,706,352.10— the exact sum of871,754.58prior-year P&L and834,597.52FY2026 YTD Net Income. Including both synthetic rows closes every subsidiary to0.00. 8,719non-posting Balance Sheet lines leak withouttal.posting = 'T': Cumulative through October 31, 2026,TransactionAccountingLineholds8,719non-posting Balance Sheet lines (tal.posting = 'F') beside the28,918posting Balance Sheet lines:6,661PurchOrdlines (1,625,414.14net debit minus credit),2,018SalesOrdlines (-137,236.06),32WorkOrdlines (0.00),3ItemShiplines (-150.90),3Journallines (-115.95), and2VendBilllines (0.00). On that same run,t.postingandtal.postingagreed on all53,695cumulative lines (41,009T/T,12,686F/F), though filteringtal.posting = 'T'remains the safer Multi-Book habit.account.generalrateandAccountingPeriodrollups: Every posted account on the demo ledger carries NetSuite's default rate type onaccount.generalrate(CURRENTon all25active Asset and Liability accounts,HISTORICALon1Equity account, andAVERAGEon all64P&L accounts), whileAccountingPeriodholds238rows (168base posting periods,56quarter summary rows, and14fiscal-year summary rows).- Comparison against a prior native Balance Sheet capture and scope limits: On Subsidiary 1 A/R through October 31, 2026,
NVL(tal.debit, 0) - NVL(tal.credit, 0)andSUM(tal.amount)agreed to0.00on both1110(700,615.52) and1910(1,000.00).1910 - Intercompany Receivables USmatches our earlier November 12, 2026 native Balance Sheet screenshot (1,000.00) exactly;1110 - Trade Receivables(700,615.52on December 4 versus706,948.40via SuiteQL and706,798.40on the November 12 native screenshot) reflects both subsequent demo-account edits and an uninvestigated+150.00gap between the API reader role and the Administrator UI report on November 12. In addition, the demo ledger has only primary accounting book1and USD subsidiaries with posted balances, so Multi-Book leakage and multi-currency consolidation with CTA do not fire there — the constructed OneWorld group below isolates all five Balance Sheet translation and equity mechanics at once.
Worked tie-out: Harbor Inc. (Consolidated), 31 October 2026
Every Harbor figure below is constructed. This is the exact October 31, 2026 group anchored in Why a saved search won't match the balance sheet (and its P&L counterpart A SuiteQL P&L that ties to NetSuite): Harbor Inc. (US parent, USD), Harbor GmbH (German subsidiary, EUR), Harbor Elimination (USD, holding the controller's 208,000 USD investment-against-share-capital elimination posted January 2025), calendar fiscal year, automatic year-end close (zero postings to Retained Earnings), primary book 1, October 31 Current consolidated rate 1.1000 (Calculating Consolidated Exchange Rates Automatically), January 2025 Historical rate 1.0400 (Consolidated Exchange Rate Automatic Calculation Example), and hand-set monthly Average rates for open periods (Editing Consolidated Exchange Rates).
Running the guarded SuiteQL query above returns each subsidiary cleanly in its own base currency — balancing to 0 per subsidiary before translation — and translating Harbor GmbH by each account's consolidated rate type ties straight to NetSuite's Consolidated Balance Sheet:
| Guarded SuiteQL output by subsidiary (31 Oct 2026, book 1) | Base currency | Assets | Liabilities | Share capital | Prior-year P&L (Retained Earnings) | FY2026 YTD P&L (Net Income) | Base check (A - L - E) |
|---|---|---|---|---|---|---|---|
| Harbor Inc. | USD | 1,570,000 | 310,000 | 500,000 | 240,000 | 520,000 | 0 |
| Harbor GmbH | EUR | 542,000 | 140,000 | 200,000 | 96,000 | 106,000 | 0 |
| Harbor Elimination | USD | (208,000) | 0 | (208,000) | 0 | 0 | 0 |
Constructed figures, each subsidiary in its own base currency. Harbor Inc.'s assets include the USD 208,000 paid for Harbor GmbH's EUR 200,000 share capital on 6 January 2025 at 1.0400; Harbor GmbH earned EUR 8,000/month across FY2025, EUR 10,000/month Jan–Sep 2026, and EUR 16,000 in October 2026.
Translating Harbor GmbH's EUR lines by rate type — Assets (542,000 × 1.1000 = 596,200) and Liabilities (140,000 × 1.1000 = 154,000) at Current 1.1000, Share capital (200,000 × 1.0400 = 208,000, eliminating against Harbor Elimination's (208,000)) at Historical 1.0400, FY2025 Retained Earnings month by month at Average (108,400, implied 1.1292), and FY2026 YTD Net Income month by month at Average (120,050, implied 1.1325) — leaves CTA of 5,750 (+12,000 from share capital, -2,800 from FY2025 earnings, -3,450 from FY2026 earnings), matching NetSuite's CTA Balance Audit report, which "shows the contribution from individual accounts to the CTA during the selected period".
Now compare a naive SuiteQL Balance Sheet query that already obeys the four basic P&L filters (posting periods through Oct 31, tal.posting = 'T', tal.accountingbook = 1, and Harbor Elimination included), but queries only Balance Sheet accounts and translates Harbor GmbH at a single period-end rate (1.1000):
| Bridge from naive Balance Sheet SuiteQL pull to NetSuite Balance Sheet (USD) | Assets | Liabilities | Equity | Assets − (Liabilities + Equity) |
|---|---|---|---|---|
| Naive Balance Sheet SuiteQL pull (BS accounts only, single 1.1000 rate) | 1,958,200 | 464,000 | 512,000 | 982,200 |
1 · Retained Earnings: add FY2025 P&L (ap.enddate < FY start), at 1.1000 |
— | — | 345,600 | (345,600) |
2 · Net Income: add FY2026 YTD P&L (ap.startdate >= FY start), at 1.1000 |
— | — | 636,600 | (636,600) |
| 3 · Rate: translate Harbor GmbH share capital at Historical 1.0400, not 1.1000 | — | — | (12,000) | 12,000 |
| 4 · Rate: translate FY2025 and FY2026 P&L at monthly Average rates | — | — | 6,250 | (6,250) |
| 5 · CTA: dynamic Cumulative Translation Adjustment balancing line | — | — | 5,750 | (5,750) |
| Reconciled SuiteQL Balance Sheet | 1,958,200 | 464,000 | 1,494,200 | 0 |
| NetSuite Balance Sheet, Harbor Inc. (Consolidated), 31 Oct 2026, primary book | 1,958,200 | 464,000 | 1,494,200 | 0 |
| Difference | 0 | 0 | 0 | 0 |
USD. Constructed figures; generated and re-footed by the packet script committed beside this page. Consolidated equity splits into Share capital 500,000 + Retained Earnings 348,400 (240,000 + 108,400) + Net Income 640,050 (520,000 + 120,050) + CTA 5,750 = 1,494,200.
Steps 1 and 2 alone make the pull balance at 1,494,200 total equity — which is why single-rate consolidated SQL queries often fool a quick footing check. Underneath that matching total, share capital is overstated by 12,000, Retained Earnings and Net Income are understated by 6,250, and CTA (5,750) is missing entirely until steps 3 through 5 apply each account's rate type.
Auditing an AI-generated SuiteQL Balance Sheet
Whether you write the query yourself or review one an AI assistant generated, check five items in the SQL before trusting a single Balance Sheet line:
- P&L roll-forward and Period End Journals: Does the query sum prior fiscal years' P&L (
ap.enddate < fy_start) into Retained Earnings and current-year P&L (ap.startdate >= fy_start) into Net Income, and does it exclude Period End Journal Entries if that feature is enabled? - Three-table join path: Does it join
Transaction→TransactionLine→TransactionAccountingLineon bothtransactionandtransactionline, pullingtl.subsidiaryfromTransactionLine? - Posting, book, and detail-account guards: Does it enforce
tal.posting = 'T',tal.accountingbook = 1(or your target book), anda.issummary = 'F'? - Cumulative posting-period cutoff: Does it filter
t.postingperiodviaAccountingPeriodwithap.isposting = 'T' AND ap.isquarter = 'F' AND ap.isyear = 'F' AND ap.enddate <= as_of, rather thant.trandate? - Signs, currencies, and rate types: Does it compute explicit
NVL(tal.debit, 0) - NVL(tal.credit, 0)(Assets) andNVL(tal.credit, 0) - NVL(tal.debit, 0)(Liabilities, Equity, and P&L), group bytl.subsidiaryandc.symbol, and apply Current / Historical / monthly Average consolidated rates plus CTA when consolidating multiple currencies?
When you ask Frontier a question about your NetSuite ledger, it writes SuiteQL against your account and returns the query and underlying rows beside the answer. Its ledger query guidance calls for posting lines, the primary book (book 1), and posting-period filters, and keeps subsidiary currencies separate; because each query is generated for your question, inspect the attached SQL for how Retained Earnings, Net Income, and multi-currency translation are handled before relying on any figure at close.
Frontier reads your NetSuite through one integration role that you create and can revoke at any time: web-services only, view-level record permissions. Every answer carries the query and the rows behind it, so your team can check any figure against the ledger. Results are stored and processed in Frontier's secured infrastructure, and each customer's workspace is isolated at the database layer. In conversations and analysis your data is never sent in bulk to an AI model provider: by default the model sees only a small preview of a result — its shape, column names and a handful of rows — while the broader analysis runs as code inside Frontier's own secure compute environment, so your data is never sent anywhere it does not need to be. Per-column redaction of sensitive fields such as customer names, addresses and emails is applied inside NetSuite, so redacted values never leave NetSuite. Teams in regulated industries can use Frontier with confidence, knowing their sensitive data stays in NetSuite and their compliance surface does not grow. Our customers' operational data is a liability to us, not an asset: we have no interest in it beyond answering your questions. Frontier is built to deliver the analysis you need while exposing our infrastructure to as little of your data as possible — data minimisation by default. We are committed to the highest standards of privacy and security and to continuously strengthening our posture.
One next step: run the five-point audit above on your Balance Sheet SQL — or see Asking the ledger for how Frontier attaches the query and rows behind every figure, A SuiteQL P&L that ties to NetSuite for the companion Income Statement query, and Why a saved search won't match the balance sheet for the matching saved-search reconciliation on the same Harbor group.
Sources and limits
Every Harbor figure in this guide is constructed and re-footed by the packet script committed beside this page; none comes from a customer account. The demo-account tables and diagnostics come from eleven logged, read-only SuiteQL runs on our own NetSuite demo ledger (TD3136833, role customrole_nsgpt_api_reader, zero truncation); as noted above, that demo account contains only primary book 1 and USD subsidiaries with posted balances, and 1110 - Trade Receivables changed between our earlier November 12 native UI capture and the December 4 SuiteQL run. NetSuite behaviour claims cite Oracle's documentation live at publication: Joining Transaction Line and Transaction Accounting Line, Balance Sheet Report, Year-End Closing, Period End Journal Entries, Financial Reports with Period End Journals, Consolidated Exchange Rate Types, Consolidated Exchange Rates on Reports, Calculating Consolidated Exchange Rates Automatically, Consolidated Exchange Rate Automatic Calculation Example, Editing Consolidated Exchange Rates, CTA Overview, CTA Balance Audit Report, BUILTIN.CONSOLIDATE, Reports, KPIs, and Saved Searches in Multi-Book Accounting, Book-Generic and Book-Specific Records, Adjustment-Only Books Overview, Working with Transactions, How can I filter report results by periods or dates, General Accounting Preferences, Setting Up Single Accounting Periods, Creating Accounts, and Subsidiary Context for Reports.
Questions this raises
- Why doesn't a SuiteQL query of Balance Sheet accounts balance to zero?
- Under NetSuite's automatic year-end close, NetSuite does not post net income into Retained Earnings. A query that filters only to asset, liability, and equity accounts misses both prior fiscal years' cumulative net income (shown on the Retained Earnings line) and current fiscal year-to-date net income (shown on the Net Income row). Summing P&L accounts prior to the fiscal year start and for the current fiscal year to date closes the equation to zero per subsidiary.
- Which tables and predicates do you need for a NetSuite Balance Sheet in SuiteQL?
- Join Transaction to TransactionLine, then TransactionLine to TransactionAccountingLine on both transaction and transactionline, and join Account, AccountingPeriod, Subsidiary, and Currency. Enforce tal.posting = 'T', tal.accountingbook = 1 (or your target book), a.issummary = 'F', ap.isposting = 'T' AND ap.isquarter = 'F' AND ap.isyear = 'F' with a cumulative cutoff ap.enddate <= as-of date, and explicit debit/credit sign math grouped by subsidiary and currency.
- How should a SuiteQL Balance Sheet handle Period End Journal Entries?
- When Period End Journal Entries are enabled for a subsidiary, NetSuite posts income-statement closing journals and consolidation journals to the ledger, while the standard Balance Sheet ignores them and still computes Retained Earnings and CTA dynamically. Exclude period end journals when tying to the standard Balance Sheet, or your query will double-count closed net income, CTA, and child balances.
- How do multi-currency consolidated exchange rates work on a SuiteQL Balance Sheet?
- TransactionAccountingLine stores amounts in each subsidiary's base currency. Group by subsidiary and Currency.symbol first, include elimination subsidiaries, and translate each account at its consolidated rate type — by default Current for assets and liabilities, Historical for equity, and monthly Average to build Retained Earnings and Net Income — leaving Cumulative Translation Adjustment (CTA) as the dynamic balancing line.