Aaron McCausland
08/27/2025, 10:22 PMgetInputData()
returns a data structure with a non-string value, before the value is stored, it is converted to a JSON string with JSON.stringify()
.
Returns
Array | Object | File | Query | Dataset | Search | object reference (file, suiteql, query, search)Celigo AI
08/27/2025, 10:23 PMAI generated answer (using internal Slack threads):Based on the conversations, the error in MapReduce execution when returning a Query object from the
getInputData
function might be due to the way you are handling the Query object.
The getInputData
function should return an object that can be transformed into a list of key/value pairs. If you are using a search, it is recommended to return either a search.Search object or an object reference to a saved search, rather than executing a search within the getInputData
function and returning the results. This is because there is a greater risk that the search will time out if executed within the function.
For SuiteQL, you can return an object like this:
return {
type: 'suiteql',
query: "SELECT ... FROM ... "
};
This will allow NetSuite to execute the SuiteQL query.
For a saved query.Query
object (analytics workbook), you can return an object like this:
return {
type: 'query',
id: 'custworkbook237'
}
This will allow NetSuite to execute the saved query.
Remember, the time limit available to the search is more generous than it would be for a search executed within the function.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
08/27/2025, 10:23 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863344669
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.859990656
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.852231562
Celigo AI
08/27/2025, 10:23 PM