Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

Result.getValue(options)

{Result}.getValue({name: {string},join: {string},summary: {string},func: {string}})

N/search Module
Result.getValue()
Method Description: Used on formula and non-formula (standard) fields. Returns the value of a specified search result column. Takes in arguments for name, join, and summary. This method is overloaded. You can also use Result.getValue(column) to get column values. This method takes in a single search.Column. If you have multiple search return columns and you apply grouping, all columns must include a summary property.
Returns: The return type depends on the type of search result column that was specified: boolean if the column is a check box field number if the column is a record, list, decimal number, or image field, with the following considerations: For image fields, the returned number represents the ID of the image file. string for all other column types, with the following considerations: For multiselect fields, the returned string represents a comma-separated list of IDs. Each ID represents a selectable option in the field. For date/time fields, the returned string represents the formatted string value of the date. You can use methods in the N/format module to work with this string (for example, converting it to a Date object). For more information, see N/format Module.
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Result.getValue(options)

Example:

// Code Example 1
//Add additional code
//...
var searchResults = mySearch.run().getRange({
start: 0,
end: 100
});
for (var i = 0; i < searchResults.length; i++) {
var amount = searchResults[i].getValue({
name: 'amount'
});
var entity = searchResults[i].getValue({
name: 'name',
join: 'location'
});
//...
//Add additional code

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