Can we use setTimeout in 2.1? and if yes, can some...
# suitescript
r
Can we use setTimeout in 2.1? and if yes, can someone give me an example of a script?
b
no, closest you get are Promises
there are various ways of waiting, the most practical of which is making an https request that takes the required amount of time to return
r
can you suggest some services like that, secondly it will not be approved for our system as they might have some security concerns. So I went with an approach where we are using a while loop till new Date() > Starting Date + the milliseconds we needed it to delay, but I am assuming it will consume threads and is not a recommended solution. But we need this just for 1 time activity, so I think we can get by
b
i personally like httpbin, has a docker option too if you wanted to host it yourself