I am using a workflow to add a button to a transaction in a specific circumstance, and then this button will transfer the workflow to another state where a specific email template is sent (with the transaction attached), and then returns the workflow back to the primary state.
This works fine - however I would like to have the attached transaction show a slightly different template. I can achieve this by setting a checkbox on the transaction, and then the template will adjust when printing / emailing via an advanced PDF form.
I would like to fully automate this, so following the button press I am attempting to:
- Set the Checkbox to T
- Send the Email
- Set the Checkbox to F
I have tried doing this all in one workflow state, or in 3 separate states, and in each case I get the 'Record has Changed' error. I have tried various options of transitions (on entry, after submit), and also various options for the actions (on entry, before submit, after submit, on exit).
It is quite possible that there are other workflows triggering and causing the error.
Is there another way to very the Advanced PDF template from the workflow action/state?
If not, any suggestions on how to avoid the Record has Changed error?