language area · Searches

Summary searches

group by and named aggregates such as total = sum(amount) turn a search into a summary, with typed rows that carry exactly the groups and totals.

Implementation
Implemented published in npm 0.1.0
Kind
Mynt language, not a SuiteScript method
A

Supported · compiles today

mynt
1let totals = search SalesOrder2    where mainline === true3    group by entity4    select entity, total = sum(amount)5    order by total desc
suitescriptoutput, trimmed
const totals = mynt$search(search.Type.SALES_ORDER, [{ name: "amount", summary: "SUM", alias: "total", sort: "DESC" }, { name: "entity", summary: "GROUP" }], ["entity"], [["mainline", search.Operator.IS, "T"]]);

Each aggregate is named, and the name is the row's field: row.total. The helper sets search.Summary on each column.

B

Published on npm since 0.1.0. Verified with mynt build on 13 Oct 2026.

  1. Reached the compiler.
  2. Published in Mynt 0.1.0.
C

SuiteScript methods this feature lowers to or works through. They are counted on their own pages, never through the feature.