Is it possible for a workflow to update a field an...
# suiteflow
m
Is it possible for a workflow to update a field and then return an error? I tried doing putting the actions in separate states, and it looked like it was working but now stopped for some mysterious reason.
j
is it still updating the field, and just not returning the error anymore? Or is the wf just not running at all.
m
If I have the return error action then it will show an error but not update the field. If I remove the return error, then the field updates as expected
j
can you post a screenshot of the WF state?
m
Sure, these on the workflow states involved
message has been deleted
message has been deleted
message has been deleted
I've put the set field value in a separate state hoping that would allow the field update work and it did seem to in one sandbox, but when I deployed to different sandbox it stopped working
j
Are you setting value on an existing (already saved) record?
m
Yes
j
I have had issues with that before but I think only on pageload
does it work on a new (create) record?
what do the logs show?
(wf logs)
m
Logs show that it transitioned to set field value state correctly
The logs don't have anything about Show Error Message State, but the error message is getting displayed
j
I don’t see anything in the log for the SET FIELD VALUE action though
what’s the condition on the SET FIELD VALUE? Is it correct?
m
No conditions
The condition is on the transition to that state
If I disable the show error message I get three entries in the workflow history and field is updated as expected
message has been deleted
j
that’s SO weird
m
message has been deleted
message has been deleted
j
hard to tell what’s happening without seeing the rest of the transitions - it’s like it’s somehow skipping that step.
I would try disabling transitions (all) then gradually add back in
m
yeah though I think I'm going to give up and convert this to a script
thanks for your help
j
yeah though I think I’m going to give up and convert this to a script
usually my approach 🙂
I hate workflows
m
lol i've definitely stretched this one way beyond what a workflow should be doing