Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

search.global(options)

{search}.global({keywords: {string}})

N/search Module
search.global()
Method Description: Performs a global search against a single keyword or multiple keywords. Similar to the global search functionality in the UI, you can programmatically filter the global search results that are returned. For example, you can use the following filter to limit the returned records to Customer records: 'cu: simpson' The search.global(options) method also includes a promise version, search.global.promise(options). For more information about promises, see Promise Object. For more information about global search, see Global Search.
Returns: search.Result[] as an array of result objects containing these columns: name, type, info1, and info2 Results are limited to 1000 records. If there are no search results, this method returns null.
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=search.global(options)

Example:

// Code Example 1
//Add additional code
//...
var customerSearch = search.global({
keywords: 'cu: simpson'
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4345775747.html