How to Promise.all() in SuiteScript 2.0 (Netsuite)

340 views Asked by At

So the scenario is like this: I have a Suitelet that displays lines, lines are marked with a checkbox by a user and then a "submit" button is clicked. That button calls a Client Script function that goes over the selected lines in a loop and sends https calls to the Suitelet one line at a time to submit the lines (create a custom record and update a Work Order line).

Once all lines are submited a UI message is displayed with success and error messages.

Now I want to make the HTTPS calls asynchronous which I know I can do with https.prmise BUT I can't figure out how to Prmomise.all in SuiteScript 2.0.

Help?

0

There are 0 answers