I am getting the following error in the sugarcrm.log:
[12047][1][FATAL] Query Failed:SELECT id ,calls.name as call , calls.assigned_user_id owner FROM calls WHERE deleted=0 AND id=‘64297c9a-1c8a-7262-98be-531b18f9207c’::: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call , calls.assigned_user_id owner FROM calls WHERE deleted=0 AND id=‘64297c9a-’ at line 1
The workflow is started if a call is rescheduled which changes the custom field to the new start date of the call.
The issue is intermittent with some call reschedules working and others not, but I have so far been unable to find similarities in the calls that do not update. I have run a repair but still no change.
Applied the fix but still seem to have the issue. Could having two workflows being fired off from the same module cause an issue? I have another workflow that runs against the Calls module that modifies notes that have been entered against the call. Looks like the note workflow runs every time but the workflow above does not.
The above workflow, when it does run, looks to run at call save, ie the time that the process audit shows that the workflow run is not at the time the cron job runs.
I had three different workflows that were meant to run when a Call was modified depending on the changes made to the Call. Sometimes only one workflow would have the conditions met which would run all the time. If two or more workflows had all conditions met then I was seeing varying results.
I was under the impression that a workflow would only run against a record once, from what I have found now I believe that it is actually the workflow module that will run against the record only once. So having three workflows trying to run against a single record was the issue because the first workflow to run against the record sets a flag or similar that stops the subsequent workflows from running against the same record. To resolve this I modified my workflows to use Repeated Runs.
If anyone sees that that this is incorrect, please let me know.
Interestingly, this was working for me fine - until recently - and then stopped when I created a second workflow to overcome the challenge of not having an OR option available in conditions. I have QTY, Amount and Total fields and if either of the qty or amount field value changes it should update the total field. It will do this with a single workflow but not when I have multiple workfolws operating on the same module by the look of it. Definitely appears many people are being affected by similar issues.