Class: SavedSearch

SavedSearch

new SavedSearch(searchId, recordType, lowerBound, batchSize) → {Upserter}

SavedSearch Class
Parameters:
Name Type Description
searchId string The string representing the search id
recordType string The string representing the record type
lowerBound string The string representing the lower bound id
batchSize string The string representing the batch size
Source:
Returns:
A new instance of SavedSearch
Type
Upserter

Methods

appendResults() → {null}

Accumulates the given results block onto the result list
Source:
Returns:
Type
null

createSearchColumn() → {null}

Generates a new nlobjSearchColumn instance and adds it to the list of search columns
Source:
Returns:
Type
null

createSearchFilter() → {null}

Generates a new nlobjSearchFilter instance and adds it to the list of search filters
Source:
Returns:
Type
null

executeSearch() → {null}

Procedural method that orchestrates the execution of the search
Source:
Returns:
Type
null

extractLowerBound() → {null}

Update the context for the next iteration of the search using the given results block fetched from NetSuite
Source:
Returns:
Type
null

getParams() → {object}

Generates aan object containind the search params from the client
Source:
Returns:
The object representing the request parameters from the client
Type
object

getSearchResults() → {Array}

Request search results from NetSuite using the given context
Source:
Returns:
The Array containing the search result objects
Type
Array

isExecutionDone() → {boolean}

Determines if another iteration of searching is required based on the count of accumulated results versus the batch size or a check to determine if Netsuite has reached the end of the requested dataset
Source:
Returns:
The boolean representing successful completion
Type
boolean

reply() → {object}

Generates a formatted reply containing the results of the search
Source:
Returns:
The object representing the formatted reply
Type
object

searchIteration() → {Array}

Performs a single iteration of the search loop, updating the context and accumulating results returned from the search
Source:
Returns:
The Array containing the search result objects
Type
Array

updateBoundAndFilter() → {null}

Update the context for the next iteration of the search using the given results block fetched from NetSuite
Source:
Returns:
Type
null