Isn't it true that, if I set the `deploymentId` pa...
# suitescript
d
Isn't it true that, if I set the
deploymentId
param to null when using task.create that NetSuite will auto-pick the next available deployment? Me thinks yes
c
message has been deleted
d
I'm going to give it a go now and let you know in the next 10mins
My money is on the auto-chose deployment
b
it will try to auto choose the next deployment
blobthinkingeyes 1
💪 1
whatever they use is not actually threadsafe
c
I get errors when I do it so im curious if its workin for you (edit: typing is hard it works fine w/ null deployment and gets the next one automagically)
d
Stand by (or sit, whatever is more comfortable)
Winning.
Auto chooses available deployment
🍻 1
b
beware the threadsafe warning. it can still choose to try to queue a queued deployment under higher levels of concurrency
d
Thanks @battk,I'll be on the look out for that
a
Yep that works, you can also detect if all deployments are being use and create a new deployment on the fly and re-queue the script…
d
Wait, don't you have to search to find out if all deployments are being used? Or are you saying that
task.create
will report back (via try/catch?) that all deployments are being used? @alien4u
a
Yep, you would be able to catch that, create a new deployment or create a copy of a deployment and then call the same function recursively…