Any ideas on why a runSuiteQL().asMappedResults() ...
# suiteql
w
Any ideas on why a runSuiteQL().asMappedResults() would run a query just fine but runSuiteQLPaged() would not? I'm getting "SSS_SEARCH_ERROR_OCCURRED: Search error occurred: Invalid or unsupported search"
Untitled.sql
It appears to be the ORDER BY-clause that caused it.
s
that seems like it has to be a bug
z
I am sure that ORDER BY is not supported wirh pagged run
t
I run Paged with Order By, I believe the problem is you can't use the Alias in the Group By. Try 'Group by MAX(T.tranDate) DESC'
w
But I didn't use an alias in the group by.
t
Correction ORDER BY MAX(T.tranDate)
w
ok
t
I have my head in my own SuiteQL and working on the grouping portion now....sorry for that
w
I didn't actually need the order by, so I just deleted it, but it sounds very plausible that it doesn't like aliases in the ORDER BY. 👍 Another fun thing I found out was that if I had aliases with spaces and then wrapped that query inside another ROWNUM query (to be able to run runSuiteQL().asMappedResults() for 5000 results at a time. It failed. It worked when removing the spaced in the aliases.