Referring to M/R scripts and `getInputData()` I ju...
# suitescript
s
Referring to M/R scripts and
getInputData()
I just stumbled upon this advice in the NS help: Passing Search Data to the getInputData Stage In the getInputData stage, your script must return an object that can be transformed into a list of key/value pairs. A common approach is to use a search. If you decide to use this technique, note that the recommended approach is to have your function return either a search.Search object or an object reference to a saved search. By contrast, if you execute a search within the getInputData function and return the results (for example, as an array), there is a greater risk that the search will time out. Instead, Oracle recommends using one of the following approaches: Return a search object. That is, return an object created using search.create(options) or search.load(options). Return a search object reference. That is, return an inputContext.ObjectRef object that references a saved search. In both cases, the time limit available to the search is more generous than it would be for a search executed within the function.
So, it looks like the camp that returns a search, rather than running a search and returning objects is indeed the preferred method?
the above is from /app/help/helpcenter.nl?fid=section_4685215171.html
k
yes I remember them saying this last year at Suiteworld - just return the search.create/load output
s
Yeah i always return the searchObj in getInput