Snippet to create a delay in a server side script

Snippet to create a delay in a server side script

I created this function because setTimeout doesn’t exist in server side Netsuite. I have never had the need to use it, but I thought someone else would find it useful.

Insert this function in your code:

And then call it like this:

Beware of execution time limits when running this code. Always test first.