I can't do this in a Client Script?
# suitescript
a
I can't do this in a Client Script?
j
setTimeout isn't blocking, so that code will create tons and tons of timers until pDone is true I think you are looking for
Copy code
var timerID = setInterval(function() { (taskId); }, 6000);

// ...
if (pDone) {
  clearInterval(timerID)
}