Hey guys, is there any good article out there with...
# suitescript
m
Hey guys, is there any good article out there with Workflows vs SuiteScript? I am trying to get together a list of the pros and cons.
n
SuiteScript!
d
Following! Yes, anything will help. Performance differences, configurability, when to use and when not to use Workflows.
n
In workflows, you cannot create a custom template for email/PDF. Workflows aren't multi-threaded.
m
good points
anything on workflow actions scripts?
(negative)
or against suitescript
so for example, why use a workflow if u need to code in a workflow action
would be one
map/reduce against a scheduled workflow, of course
e
@Matias Bonifacino if you code a workflow action script, then you have a reusable feature/module that anyone else can easily just drag and drop on new workflows. Workflows are intended for people that do not have the skills/knowledge to code (it does not mean they are easy to use, sometimes they are confusing). In the past they had the limitation to execute line level code but now I think you can do that. The negative part is the mess you get when on a record you have workflows and user event script and then you want to run specific logic, you do not know what it is being executed first (if you are not familiar with all the workflows and scripts)
m
whats the difference between a workflow action script and a library?
in SuiteScript
that u can call from any script, and reuse it
e
You need to play a little bit with workflows to understand the business cases. If you have a client that already have a workflow with a lot of steps and that is working properly, you will not get rid of the complete worklflow only due that there is no workflow action to include new logic in the workflow, you create a workflow action script to achieve the goal. I am not in favor of workflow, actually I prefer having the freedom of code in any script but if you are a consultant/business people, you probably will go with a workflow instead of starting to learn how to code. You can do exactly the same with suitescript as with worklflows and even more, the inverse is not true.
m
@eminero exactly, I completely agree. That's what I am looking for here, what can be done on scripting that can't be done on a workflow, and in what ways suitescript is better than a workflow
d
All valid points @eminero. Is there any documentation or best practice sites? Anything that would give a good guide?
m
In my opinion, I see workflows as SiteBuilder against SuiteScript as SCA
but yeah, it would be great to have some resources of documentation that can back everything we said here
e
These are my notes from some years ago, I was researching the same for a presentation. You could verify is these are still limitations.
Accessing sublists Calling web services Updating other records Initiating a workflow on related records Designing complex business logic
m
👏
this is awesome, thanks @eminero
e
You're welcome!
m
@eminero and all of that u cant even do in a workflow action script, right?
e
I would say, yes but it would be worth asking the same or discussing this in #C2C2JM29M
m
ill do that, thanks @eminero
👌 1
one last question, can workflow action scripts be locked (if u are bundling it) like other scripts do?
d
Yes, they can.
b
the general answer is that suitescript is more capable than workflows
only simple tasks really offer a choice between the two
and telling when you can use a workflow usually is an experience problem, you need to know workflows well enough to know if the task can be accomplished via a workflow
💯 1
id tell you to ignore all solutions involving workflow action scripts, they are the worse case when in comes to maintenance issues
💯 1
if something goes wrong, you need someone who knows workflows and scripting to debug the issue