module function · N/search

create()

search.create(options)

Creates a new search and returns it as a search.Search object.

Implementation
Implemented published in npm 0.1.0
Design
Accepted search T where ...
Proposals
A
Signature
search.create(options)
Module
N/search
Returns
search.Search
Governance
None
Script types
Client and server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1search.create({2    type:      /* search.Type, required */,3    filters:   /* search.Filter | search.Filter [] | Object | Object[] | string | string[], optional */,4    columns:   /* search.Column | search.Column [] | Object | Object[] | string | string[], optional */,5    packageId: /* string, optional */,6    settings:  /* search.Setting | search.Setting [] | Object | Object[] | string | string[], optional */,7    title:     /* string, optional */,8    id:        /* string, optional */,9    isPublic:  /* boolean, optional */10});
Oracle reference for this method
ParameterTypeRequiredDescription
options.typesearch.TyperequiredThe search type that you want to base the search on.
options.filterssearch.Filter | search.Filter [] | Object | Object[] | string | string[]optionalA single search.Filter object, an array of search.Filter objects, a search filter expression, or an array of search filter expressions. A search filter expression can be passed in as an Object with the following properties: name (required) join operator (required) summary formula values For more information about these properties, see Filter Object Members . If a provided filter value has an incorrect type (for example, a string instead of a number), the filter value is ignored. For server scripts, a log entry is created when an incorrect type is provided. Note: You can further filter the returned search.Search object by adding additional filters with Search.filters or Search.filterExpression .
options.columnssearch.Column | search.Column [] | Object | Object[] | string | string[]optionalA single search.Column object or array of search.Column objects. You can optionally pass in an Object or array of Objects with the following properties to represent a Column: name (required) formula function join label sort summary For more information about these properties, see Column Object Members .
options.packageIdstringoptionalThe application ID for this search.
options.settingssearch.Setting | search.Setting [] | Object | Object[] | string | string[]optionalSearch settings for this search as a single search.Setting object or an array of search.Setting objects. Search settings let you specify search parameters that are typically available only in the UI. See Search.settings . You can optionally pass in an Object or array of Objects with the following properties to represent a setting: name value For more information about these properties, see Setting Object Members .
options.titlestringoptionalThe name for a saved search. The title property is required to save a search with Search.save() .
options.idstringoptionalScript ID for a saved search. If you do not set the saved search ID, NetSuite generates one for you. See Search.id .
options.isPublicbooleanoptionalSet to true to make the search public. Otherwise, set to false . If you do not set this parameter, it defaults to false . This parameter sets the value for the Search.isPublic property.
B

Supported syntax · compiles today

myntsearch T where ...
1let customers = search Customer2    where email !== ""
suitescriptoutput, trimmed
const customers = mynt$search(search.Type.CUSTOMER, ["email"], [], [["email", search.Operator.ISNOTEMPTY, ""]]);

mynt$search is a helper the compiler emits once per file. It calls search.create with the planned columns and collects every page of runPaged. Published on npm since 0.1.0. Verified with mynt build on 13 Oct 2026.

C

Competing syntax for create, from GitHub Discussions. Select two or more to compare them side by side, with the syntax Mynt supports today as a baseline.

All discussions
Mynt todaylet customers = search Customer

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/search · search.create(options)

Suggest syntax for create