can i run a script on a report to show the quantit...
# ask-stanley-ai
h
can i run a script on a report to show the quantity returned from customers?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you cannot directly run a script on a report in NetSuite. However, you can create a saved search that matches the report and use that in your script. For example, if you want to show the quantity returned from customers, you can create a saved search that includes this information and then use SuiteScript to access the data from the saved search. Here is a general approach to do this: 1. Create a saved search in NetSuite that includes the fields you need (in this case, the quantity returned from customers). 2. Use the
N/search
or
N/query
module in SuiteScript to access the saved search. Here is a basic example of how you might use SuiteScript to access a saved search:
Copy code
javascript
var mySearch = search.load({
   id: 'customsearch_my_saved_search'
});

mySearch.run().each(function(result) {
   // Process each result
   return true;
});
In this example, replace
'customsearch_my_saved_search'
with the ID of your saved search. ****** 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.823120177
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820709646
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820552588
Please provide your feedback on this answer.