darrenhillconsulting
11/08/2022, 5:37 PMsearch.create.promise
when there are no results? Does it go to the catch
?battk
11/08/2022, 5:47 PMdarrenhillconsulting
11/08/2022, 5:54 PMthen
?battk
11/08/2022, 5:55 PMdarrenhillconsulting
11/08/2022, 5:57 PMbattk
11/08/2022, 5:59 PMbattk
11/08/2022, 5:59 PMbattk
11/08/2022, 6:00 PMbattk
11/08/2022, 6:01 PMbattk
11/08/2022, 6:01 PMdbarnett
11/08/2022, 6:25 PMasync/await
syntax serverside as well (https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_156042699370.html)
might make more straightforward to develop the code that way instead of being stuck in "callback/promise hell"
although aside from that, I agree with all the information presented above - all still relevantdarrenhillconsulting
11/08/2022, 6:51 PMerictgrubaugh
11/08/2022, 9:23 PMN/search.Search
instance gets passed to then()
, regardless of result count.
In just the little console tinkering I've done, the methods for retrieving the results (run()
and runPaged()
) seem quite finnicky from within the callback.battk
11/08/2022, 9:26 PMerictgrubaugh
11/08/2022, 9:32 PMerictgrubaugh
11/08/2022, 9:47 PMerictgrubaugh
11/08/2022, 9:47 PMs
NickSuite
11/09/2022, 5:36 AMdarrenhillconsulting
11/09/2022, 2:44 PMresult
so, I jumped to conclusions. Once I took time to read, experiment (and consume everyone's feedback), of course it all makes sense now.darrenhillconsulting
11/09/2022, 2:46 PM