If the same thing can be done on a workflow or a s...
# general
g
If the same thing can be done on a workflow or a suitescript userEvent beforeSubmit, which one is faster, or "better" to use? What if I already have another suiteScript running beforeSubmit? Example, if the existing suiteScript is looking for a checkbox on a sales order, and if that checkbox is checked, then it ensures a specific line item exists. Then, if we also want to update a hidden field to match another value, would a workflow or suitescript be more efficient? I'm hoping the answer is that they're so comparable that it is whichever is more comfortable (competent developer here, so I'd prefer to keep everything in a suitescript.)
a
I believe there are overhead costs to additional WFs or scripts, so having as few as possible is technically most efficient. I don't know how material they are though or at which point they scale to become relevant, but I'd imagine it could be a compounding factor with other things going on.
🙌 1
As to which is better in a vacuum, my money would be on suitescript, but I am not sure there. I think a lot of the value of a workflow comes down to how easily a non-dev can make changes to it, although with scripting you also get the (potential) benefit of a code repository to track changes. You can't store revisions of a workflow as easily.
A good topic for either #C2C2JM29M or #C29HQS63G btw, might garner more specific thoughts from others there
g
I avoided asking in #C29HQS63G since I expected it to be biased towards scripting. If it isn't an obvious and known answer, I presume they're close enough to use whichever is easier. I do understand and agree with keeping the total number of unique scripts to a minimum.
I have one script per record when it's our own internal code. Unfortunately a lot of netsuite bundles and third party bundles attach multiple scripts per bundle. Oh well. Thanks!
b
the answer is probably going to depend more on what you need to do and how you do it
people can write workflows that perform worse than scripts, the same way people can write scripts that perform worse than workflows
If you really cared, you can use the APM suiteapp to get a better idea of workflow vs suitescript