search.global(options)
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:
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 |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
Global search keywords string or expression. |
2015.2 |
Errors
Error Code |
Message |
Thrown If |
---|---|---|
|
{1}: Missing a required argument: {2} |
Required parameter is missing. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/search Module Script Samples.
//Add additional code
...
var customerSearch = search.global({
keywords: 'cu: simpson'
});
...
//Add additional code