How do you get opening account balances as of a specific date (e.g. Jan 1, 2024) via API or ODBC?

I’m building an integration that syncs account balances from NetSuite into our internal system as part of an “opening balances” feature. Ideally, I’d like to get the balances per account as of a specific date (e.g., start of year) without summing all historical transactions manually.

So far, I’ve been using SuiteAnalytics Connect (ODBC) + the TransactionLine table to sum amounts per account up to a given date — but this gets slow for accounts with many years of history.

Is there:

  • Any native API or saved view that exposes Trial Balance or account balances as of a date?
  • A way to query pre-aggregated data for this (like how the Trial Balance UI report does)?
  • A best-practice approach others have used to handle opening balances for reporting or integrations?

Context: we’re using the standard GL structure (not multi-book), and I’m communicating via Python (netsuite-connector and ODBC). Open to SuiteQL or other solutions if faster or simpler.

Would love to hear how others handle this!

Rookie Asked on June 12, 2025 in SuiteAnalytics.
Add Comment
1 Answer(s)
Best answer

Hi,

Unfortunately, there’s no other option than to sum up the historic data.

The advantage you get from SuiteQL is that you can ask for the data to be summed up on the NetSuite side.

I found this a good starting point:
https://github.com/nserpsolutions/public/blob/main/generic/nse_sa_trial_balance.sql
https://github.com/nserpsolutions/public/blob/main/generic/nse_sa_trial_balance_periodic.sql

Thanks,

Chris

Advanced Answered on June 17, 2025.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor