Has anyone successfully got server side promises working? I have some logic that I need to execute when the previous logic has completely executed.
c
CD
10/15/2021, 4:48 PM
Call me old fashioned, but you can just execute line-by-line synchronously
👍 2
c
creece
10/15/2021, 4:51 PM
Would definitely need some more info on it.
r
Rehan
10/15/2021, 4:55 PM
Well there is a suitelet that makes adjustments on the customer record. Once the customer record has set certain fields I need to save the sales order which triggers the after submit function. I need to wait for the after submit function to complete before I execute the next set of logic.
n
Nicholas Klug
10/15/2021, 6:26 PM
I'm not sure how a promise would work with that? You're calling the save function and waiting for that to complete. Then NetSuite calls the after-submit functionality which is entirely separate to the suitelet save loop
Nicholas Klug
10/15/2021, 6:27 PM
what you would need is to have that after submit function execute whatever else you're doing separate from that Suitelet
b
battk
10/15/2021, 10:17 PM
you have not described a situation that Promises were meant to solve