This may be simple but I just wanted to ask. I wan...
# suiteflow
t
This may be simple but I just wanted to ask. I want to be able to see in the system information that a Purchase Order has been printed. Do I need to create a custom field that is change from F to T when the PO is printed? Can this be done via workflows? Slack Conversation
m
There is a workflow event type of Print
t
Should I trigger this on Entry?
m
It looks like it would only work using Before Record Load trigger, but I've never tried this specifically.
t
Okay, I'll give it a shot.
Thank you.
m
Maybe try to check the box on Before Load with the Event Type of Print?
Seems weird but maybe it works??!
t
Should this be On View or update?
m
I would check both to start
it's hard to tell
t
I don't need a condition because the trigger type is print correct?
m
Yes I would leave the condition blank as well
t
Should I set up the Action with the same trigger and event type?
m
yes
Maybe don't put the trigger and event type on the overall workflow conditions though
this way you can see in the WF Logs if or why it doesn't work
only but the Trigger and event type on the Action
So the WF will always inititate and start the logging process, but then only the action is triggered when the event type is met
t
So trigger type on the workflow itself should be before record load but all event type?
m
The overall workflow configuration should look like this
No restrictions or conditions
(at least to start)
And enable logging
t
It didn't seem to do anything unfortunately.
m
Did the workflow logs show anything?
Maybe also try changing the trigger to Before Submit or After Submit?
t
I changed the action to before submit and no bueno
Our process is that the warehouse will print the PO in View and not edit.
m
Suppossedly this works??
Maybe you do need the specific definitions on the overall workflow initiation config
t
I will try this. Just so you know, I truly appreciate this feedback.
m
no problem...hope it works out
Let me know what happens...now I'm intrigued...LOL
t
The On Create: unchecked and on Update: checked , is that a condition?
m
It’s these
t
duh. I overthought it. Thanks.
I'm getting this
But if that is true, why would the be a print trigger type.
m
Yeah and that example I copied was from NetSuite documentation
So it is triggering
From your WF log it is triggering the action but it can’t update the field on before load
Try to do a transition to a new state with the same criteria as the checkbox action
See if it will transition
I got it to transition
t
Awesome! I'm going to try that shortly.
m
same problem though
bummer
you could do it on a scheduled action, but there would be a 1hr delay
which probably isn't awesome
t
I think a scheduled action would work in our use case
Do I need the transition still?
m
yes do the transition into the printed state
then do a scheduled action to check the checkbox
1 hr delay
t
I'm very unfamiliar with transitions...unfortuantely.
m
heres the transtion
t
how did you get that TO* = Printed, my TO is blank.
m
in the workflow state click new transition
in your workspace add another state
t
So remove the action from initial state, and recreate it on the 2nd state
m
yes remove the action from the intitial state
but don't recreate it in the 2nd state just yet
t
I've removed the action from initial state and created the transition.
m
now in the 2nd state add your set field value action but use the Schedule trigger
also set the delay
t
Okay! I've done that. Is the workflow supposed to end in the "print" state?
m
yes, check the do not exit workflow box
in the printed state
t
I should be able to test now, just have to wait that hour right?
m
yes first test the printing and make sure the record moves to the printed state in the workflow history
Then you will have to wait 1 hr from this time
t
Looks like we are good!
m
Awesome. Remember the scheduler runs every 30 min at the top and bottom of the hour. So in the screenshot you shared it would wait 1 hr (so 12:13pm) then the next schedule will pick it up, so it wouldn't fire until around 12:30
(sometimes a few minutes after)
t
This is great, you've been extremely helpful. Out of curiosity, the need for that second state is to allow the before record load trigger?
m
Yes the need for the second state is because you cannot perform the set field value action using the before load trigger on a record that is already loaded in the client
so we are using the transition as a workaround to let the system know when to check the box
but unfortunately the delay of 1 hr is required for shceduled actions and transitions.
t
This is exactly the explanation I needed to make sense. Thank you.
m
If you are familiar with SuiteScript you could use a client script to add a custom print button to the form and trigger the print action AND check the box at the same time so it would all be real time
Also if you are not familiar with SuiteScript we offer a custom workflow action that would also make this a "realtime" solution where you could click a button and it would take the user to the print screen
t
I mean I'm used to 1 state workflows so that's something I need to pick up over time. I've been on your website before MGBC, you have some cool functionality.
m
This Go to URL can be used to trigger the print right from the button exectuion
t
Thank you!
m
Thanks for the feedback always trying to help the Admins out there and workflows can be so useful in so many applications
t
It's been about 5 minutes after my scheduled action and I haven't seen a result. Should I wait a bit longer?
Scratch that, it worked.
m
Nice
z
Fantastic discussion! If I remember well, setFieldValue is possible only while beforeLoad and Create event, but not beforeLoad and Update... not only within workflow, the same rule is with SS2.0 scripts.