NetSuite Changed the Default Sort for SuiteQL Transaction Queries in 2026.2
If you run SuiteQL queries against the Transaction table in NetSuite and do not specify a sort order, your results now come back in a different order starting in 2026.2.
NetSuite changed the default sort column for Transaction queries:
- Before 2026.2: sorted by
Transaction.tranDisplayName(alphabetical by display name) - From 2026.2 onward: sorted by
Transaction.tranDate(by transaction date)
This only affects queries that do not include an explicit ORDER BY clause. If your query specifies a sort order, nothing changes.
Why this matters
SuiteQL, like most SQL dialects, does not guarantee result order unless you ask for one. In practice, many queries skip ORDER BY and developers rely on whatever order the database returns. When NetSuite changes the underlying default, those queries return results in a different sequence without throwing any error.
For scripts that only need the data itself, the sort order is irrelevant. But for anything that processes results in order, reads the first row as the most relevant record, or passes an ordered list to a downstream system, this change will silently alter behavior.
The change also applies to SuiteQL in Analytics Datasets, not just SuiteScript.
What might break
A query like this:
SELECT id, tranDate, tranDisplayName
FROM Transaction
WHERE custbody_custom_field = 'value'
Before 2026.2, this returned results sorted alphabetically by tranDisplayName. After 2026.2, the same query returns results sorted by tranDate. If your script assumed the old alphabetical order when processing the results, behavior has changed.
The failure mode here is subtle. There is no error. The script runs. It just operates on data in a different sequence.
The fix
Add an explicit ORDER BY clause to every SuiteQL query where the order of results matters.
To restore the previous alphabetical sort:
SELECT id, tranDate, tranDisplayName
FROM Transaction
WHERE custbody_custom_field = 'value'
ORDER BY tranDisplayName ASC
To explicitly sort by date (now the default, but better to state it):
SELECT id, tranDate, tranDisplayName
FROM Transaction
WHERE custbody_custom_field = 'value'
ORDER BY tranDate DESC
Specifying ORDER BY makes your query immune to future default sort changes. It costs nothing and removes an implicit assumption that can bite you the next time a default changes.
What to audit
Search your codebase for SuiteQL queries that:
- Query the Transaction table or join to it
- Do not include an
ORDER BYclause
Those are the only queries affected. Non-Transaction tables are not impacted, and any query that already specifies a sort order is unaffected.
If you use SuiteQL in Analytics Datasets, review dataset definitions that query Transaction records without a specified sort order.
For a step-by-step guide to finding and fixing affected queries, see How to Update Your NetSuite SuiteQL Queries After the 2026.2 Default Sort Change.
More From the Blog
NetSuite Advanced Record Customization: A New Place to Manage AI Descriptions for Your Records
NetSuite 2026.2 introduces Advanced Record Customization (ARC), a centralized area under Customization where you can view, create, update, compare, and revert AI descriptions for standard and custom record types.
NetSuite Bank Reconciliation Changed Significantly in 2026.2: What Is Different
NetSuite 2026.2 overhauled the Match Bank Data page with a new Match Suggestions subtab, renamed tabs and buttons, filter chips, and audit columns. Here is everything that changed.
Have a NetSuite challenge like this?
We can take a look and tell you exactly what we'd do.