The script's `getInputData` SuiteQL query is not r...
# ask-stanley-ai
s
The script's
getInputData
SuiteQL query is not returning results when run as part of the Map/Reduce execution, causing the script to skip
map
and
reduce
and go directly to
summarize
with zero processing.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that the issue is related to the
getInputData
function in the Map/Reduce script. The
getInputData
function is not returning any results when it is run as part of the Map/Reduce execution. This is causing the script to skip the
map
and
reduce
stages and go directly to
summarize
with zero processing. Here are a few things you can check: 1. Check the SuiteQL query: Make sure that the SuiteQL query you are using in the
getInputData
function is correct and returns the expected results when run outside of the script. You can test this by running the query in the SuiteQL tester in NetSuite. 2. Check the return object in
getInputData
: The
getInputData
function should return an object with the type set to 'suiteql' and the query set to your SuiteQL query. For example:
Copy code
javascript
return {
    type: 'suiteql',
    query: activeLineSearchQuery
};
3. Check the number of results: If your SuiteQL query is returning a large number of results, it might be causing the script to time out. You can try adding filters to your query to reduce the number of results. 4. Check the script deployment settings: Make sure that the script deployment settings in NetSuite are correct. For example, check that the script is deployed in the correct environment (sandbox or production), and that the correct roles and permissions are set. 5. Use
query.runSuiteQLPaged
for large result sets
: If your SuiteQL query is returning more than 5000 results, you can use the
query.runSuiteQLPaged
method to handle the large result set. This method returns a paged result set that you can iterate over to process the results in chunks. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.877014041
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.864990115
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.864685059
Please provide your feedback on this answer.