module function · N/search
load()
search.load(options)
Loads an existing saved search and returns it as a search.Search object.
- Implementation
- Implemented published in npm 0.1.0
- Design
- Accepted
load Search("id")
1search.load({2 id: /* string, required */,3 type: /* string */4});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.id | string | required | Internal ID or script ID of a saved search. The script ID starts with customsearch . See Search.id . |
| options.type | string | The search type of the saved search to load. Use a value from the search.Type enum for this parameter. This parameter is required if the saved search to load uses a standalone search type. A standalone search type is a search type that does not have a corresponding record type. Typically, the search type of the saved search can be determined automatically based on the corresponding record type. In this case, this parameter is not required. For standalone search types, you must specify the search type explicitly using this parameter. The following is a list of standalone search types: DeletedRecord EndToEndTime ExpenseAmortPlanAndSchedule RevRecPlanAndSchedule GlLinesAuditLog Crosschargeable FinRptAggregateFR BillingAccountBillCycle BillingAccountBillRequest BinItemBalance PaymentEvent Permission GatewayNotification TimeApproval RecentRecord Role SavedSearch ShoppingCart SubscriptionRenewalHistory SuiteScriptDetail SupplyChainSnapshotDetails SystemNote TaxDetail TimesheetApproval Uber ResAllocationTimeOffConflict ComSearchOneWaySyn ComSearchGroupSyn Installment InventoryBalance InventoryNumberBin InventoryNumberItem InventoryStatusLocation InvtNumberItemBalance ItemBinNumber |
Supported syntax · compiles today
let customers = load Search("customsearch_active_customers")
const customers = mynt$savedSearch(search.Type.CUSTOMER, "customsearch_active_customers", ["email"], []);
mynt$savedSearch calls search.load, adds only the columns and filters the program needs in memory, and never saves the search back. The account snapshot must list the search: its record type comes from there. It takes the same clauses as search T. Published on npm since 0.1.0. 0.1.0 spells it search saved Customer "customsearch_active_customers"; load Search(...) is in the compiler, not yet published. Verified with mynt build on 13 Oct 2026.
Competing syntax for load, from GitHub Discussions. Select two or more to compare them side by side, with the syntax Mynt supports today as a baseline.
let customers = load Search("customsearch_active_customers")Loading proposals from GitHub…
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,saveandRef[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?