ERROR: Workflow state transition not allowed

Hi everyone,

i have a sales order which before the update i could press “refresh” and if the corresponding sales invoice was submitted would change workflow state from X to Y. Now i get this message “Workflow State transition not allowed from XY to YZ”.
This state change, as far as i understand, is done by a custom script, which changes workflow state based on some conditions.

I could not find anything online or in the forum.
Please help

Kind regards,
Marek

I solved it. There had to be a workflow transition defined in order for the script to work. Workflow transition has dominance over the script and was blocking the script because it was not defined.
Closing this thread.

How did you work on workflow transition?