Has anyone seen the `SSS_SEARCH_ERROR_OCCURRED` er...
# suitescript
b
Has anyone seen the
SSS_SEARCH_ERROR_OCCURRED
error with a
Search error occurred: Invalid or unsupported search
message? My SS2.0 script uses N/query to pull information from a sales order and various related records. The error is thrown on
runPaged()
. The query runs just fine on some orders but throws this error on others. If it always failed I would think there was a problem with the query setup. Just hoping someone has encountered it before and has other ideas for troubleshooting.
n
Have you tried running this in the UI? There is a chrome extension called "NetSuite: Search Export" that can export your search into suitescript code. This could help identify any issues you have with the search
b
Yes, kind of. I built a dataset with the same criteria and joins as my code. That runs just fine (and generally faster). The dataset and query module let me do the joins that aren't possible with searches. Unfortunately there aren't as many tools around the Analytics piece yet. I'm going to try loading the dataset in a script and see if it acts differently than creating the query in code.
c
When this has happened to me, the search type is usually in the error message
b
Just posting a follow up. There is a huge performance difference between creating the query in code and loading a dataset configured the same way. The error was thrown after 5 minutes using
query.runPaged
and seemed to be more of a timeout indicator. Running the loaded dataset is a few seconds. I can't find any documentation on why there is such a big difference. Just sharing in case my experience helps someone else.