Hi, anyone has used query.runSuiteQLPaged and loop...
# suitescript
m
Hi, anyone has used query.runSuiteQLPaged and looped through the data using an iterator? I guess asMappedResults() cannot be used to create a javacript object. The help is a bit limited of this new function...
u
Did you do it this way? PagedData.iterator() then used .each() to get Page then on the Page use Page.data then from the ResultSet perform ResultSet.asMappedResults()
👍 1
m
yes, I finally got it to work using asMappedResults() on currentPageData:
*var* currentPage = resultPage.value;
*var* currentPageData = currentPage.data;
thank you once again @クリスピポテト, really appreciate your help