k
ok...
s
We don’t want to transform the record we want it to create an invoice and also have a billed sales order
k
Perhaps I was unclear: transform record is the same for both script and workflow.
It will act as though you have pressed the same button in the UI - for example, in your SO scenario - it will act as if you have hit "bill remaining" and then hit save.
s
But with a script I can create a record when they fulfill the order correct?
k
so the SO is still there, any item fulfillments are still there, and you have an invoice where the created from is the SO.
With a script you could cut down on the time delay if you desired. - you could make it happen the moment they perform the fulfillment
however, you could just schedule your workflow to run every 30 minutes.
s
Setting it up scheduled for every 30 minutes and it does not want to transform but i can see in the workflow history that it touched the record just didn’t do anything
k
What does it show if you turn on "show rejected actions"?
There should be a reason it didn't process.
s
Doesn’t show anything
k
And the status on the SO is pending billing?
Kind of hard to diagnose from here unfortunately...
maybe share some screenshots over the transform record action setup?
s
Yeah so I tried like every trigger and event type and switched it to scheduled so the screenshot will only show trigger on scheduled no conditions
k
Action should be entry
Workflow itself will be scheduled
t
@suitemike do you have the Enable Logging checkbox checked?
k
Criteria for which records to include should be in the saved search assigned to workflow
t
seems like you're unable to see the details of what happened. I've been dealing with a similar problem recently
k
Yeah - do that too.
s
Tyler I did forget to hit that checkbox :( but I switched to trigger on entry and it didn’t show that the workflow was touching the sales order anymore so I changed it to exit and checked the log and it says “running ONENTRY trigger under SCHEDULED (event: SCHEDULE; Context:null)”
t
Okay, what's your entry condition?
Sorry let me backup, is the record entering the workflow?
k
Ok - now that it's logging it - check the "show rejected actions" checkbox
s
I check the box and it doesn’t show anything I’ll show you with a picture I only have slack on my laptop
t
As far as I know enable logging doesn't do anything retroactively, it's just next time the workflow is initiated it will be logged
✔️ 1
so you might have to run through again with logging enabled to actually be able to look
k
It still should be on entry for what you are talking about doing.
As to why you didn't see the workflow execute on it, I'm not sure...
s
Yeah I checked the box and then executed it again
t
^ that's why I was asking about the entry condition
s
I switched to my macbook pro so I’ll have some screenshots
message has been deleted
k
Show your workflow action setup?
t
and can you post your transition/action?
s
message has been deleted
t
right off the bat I'll tell you I've had issues with running scheduled transitions on "Entry" workflows
s
I switched it back to entry and hit execute and when I do that it doesn’t show anything on the sales order
yeah it only shows up in the sales order workflow history if I set the trigger to exit
k
This is a single state workflow, right?
Do you have any scripts that run on invoices?
You could be encountering an issue with a missing field that's mandatory as well
though normally I get an email from NS when I do that in a test...
I'm still 95% sure entry is the right thing to use in a single state workflow for this.
t
I didn't realize it's a one state workflow, ignore my question about your transition
s
yeah one state flow and I tested this outside of scheduled and it worked
but I want it scheduled I just changed it over to see if it would work if I triggered it off of an edit
t
Like I said the scheduled trigger for your action is finicky when the workflow itself is not scheduled. I would consider setting the action to on entry
k
Oh. Then you likely have same problem
s
I tried setting it to entry and the workflow is scheduled
t
okay I'm getting confused then. I thought the workflow itself was on entry
s
no the workflow itself is scheduled
message has been deleted
the state is on entry but when I set it to be on entry it doesn’t show anything on the sales order
t
Okay so when you have a scheduled action there needs to be a condition still, I don't think it will automatically do that action unless the condition is met
I could be wrong there though, but for what it's worth I've been wrestling with a very similar problem recently
the schedule is just the next time the workflow looks at whether or not that action will execute, it doesn't dictate execution on its own (I don't think)
k
No - the action should still work without a condition on it
I think your problem is you took a non scheduled workflow and tried to schedule it
I would try making a new one from scratch, scheduled from the start.
s
ok i’ll dump it and try again
ok I dumped the workflow then in the workflow settings I set it to scheduled and then I created a state and in the state I set it to trigger on entry with no conditions and it still doesn’t show up on the sales order after executing
k
And if you set it back to one xit
which in theory should be the same thing
what does it say in the logs when you have enable logging turned on?
Remember - this action is the same as hitting the "bill" button then hitting save. If you have a field that's mandatory that's not filled out, it won't work.
s
message has been deleted
k
Ok - I'll take a quick stab at this in one of my demo accounts..
s
message has been deleted
it’s showing a rejected action now
t
okay so it's an issue with the contexts you have selected. beyond that I'm not sure how to help you, I haven't done this type of an action before
k
message has been deleted
message has been deleted
This worked in my demo account (need was a mandatory field)
message has been deleted
That's what happened when it failed because of missing field
Are you defining a context in your action or your workflow at all? I left mine blank
s
Do we need the field at the bottom of the state ?
i
"Need" and "At need"
What's that?
k
I added the field because it was mandatory in my account. You might have similar situations in yours
It was a demo account related to a funeral business.
s
I tried it with and without the context going to try again tho
k
the context is definitely getting you
let me see if on exit works
On exit did not work.
s
message has been deleted
I’m getting this error now
k
Has the record been fulfilled?
It won't let you bill if it hasn't, unless you have invoice in advance of fulfillment turned on
also - if it's already been turned into a bill once, it won't let you run it again.
the same way billing an SO in the user interface stops you from billing it again.
s
so it was because the payment method had the cc filled out so it was trying to become a cash sale everytime
k
Ah.
And would that transformation be what you are looking to do? Or are you just looking to invoice them?
s
I think they want it to transform to invoice paid in full
k
that's a cash sale...
unless they recorded the payment another way
already
s
Yeah I’m going to see why they didn’t like cash sales because we did have cash sales set up before.
k
Cash sale - if you have an integrated CC processor will charge the card on it.