search.Result

Note:

The content in this help topic pertains to SuiteScript 2.0.

Object Description

Encapsulate a single search result row. Use the methods and properties for search. Result to get the column values for the result row.

Note:

Use search.ResultSet for the set of results from a search.

For more information about executing NetSuite searches using SuiteScript, see Searching Overview.

For a complete list of this object’s methods and properties, see Result Object Members,

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/search Module

Since

2015.2

Important:

In search/lookup operations, custom multiselect fields of type "long text" are truncated at 4,000 characters. In accounts with multiple languages enabled, the returned value is truncated at 1,300 characters. In accounts that don’t use multiple languages, the field return truncates at 3,900 characters. You can use the record.load(options) method as an alternative for retrieving desired results.

Syntax
Important:

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 mySearch = search.load({
    id: 'customsearch_my_so_search'
});

var searchResult = mySearch.run().getRange({
    start: 0,
    end: 100
    });
    for (var i = 0; i < searchResult.length; i++) {
        var entity = searchResult[i].getValue({
            name: 'entity'
        });
        var subsidiary = searchResult[i].getValue({
            name: 'subsidiary'
        });
...
//Add additional code 

        

Related Topics

N/search Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices