We are working with Version 7.10.11 (recently updated)
I have created some workflows previously which generate an email to a user when a new lead (which meets certain criteria) is saved, and those workflows work correctly.
A week later, I duplicated one of these, changed the criteria and user, and am unable to get the workflow to send the email.
I have tried creating the workflow from scratch, changed the criteria, used a pre-existing email template, created a new email, but am still unable to get an email sent when I load a new lead that satisfies the criteria. Screen dumps of the workflow and email are attached
(we have re-named the Leads module to âBuyersâ.
Any suggestions or advice would be highly appreciated
I have tried different combinations in the Workflow, and can get it to work when âRun On:â is set to âAll Recordsâ. The workflow will not work when the âRun On:â is set to either âNew Recordsâ or âModified Recordsâ
Is it possible that a different workflow âexecutesâ first (just after âSaveâ but before the above workflow executes, and that the system then does not recognize the current Lead record as âNewâ or âModifiedâ ?
If so, is there some way to set the sequence for workflows that run on the same trigger (e.g. on saving a new record)?
Yes, I have checked the validity of the email address as well as sent it to an email address entered directly (not to a User), with the same result. It looks like the conditions for the workflow to âexecuteâ are not met
if it fires an all records and not on new records I think it if because the scheduler is not working, because at the moment is firing when youâre saving the record, not on the scheduler by cron, when it checks if itâs new or not
I have cone to the Scheduler, and copied the following two âcommandsâ into the cron job on the cpanel:
To Setup Crontab
In order to run SuiteCRM Schedulers, edit your web server userâs crontab file with this command:
sudo crontab -e -u prote**7
⌠and add the following line to the crontab file:
cd /home/prote**7/public_html; php -f cron.php > /dev/null 2>&1
I have then run a âRepairâ in SuiteCRM, an ond re-run the workflows - still unfortunately only get the email sent on âAll Recordsâ and not âNew Recordsâ or âModified Recordsâ
Could you possibly direct me to a way to test the cron?
Unless I am confused, if it fires on âall recordsâ but not ânewâ or âmodifiedâ, then it is the opposite problem: the workflows launched from Scheduler are working, itâs the other ones that are failing.
I would look for issues with other Workflows (disable them) that could be hanging this.
Then check if you have any logic hooks (especially related to save events) that could be blocking execution.
Thank you for that. I have made all other workflows âinactiveâ and run a repair, and still get the same results. I am not familiar with logic hooks, so do not think that I have utilised any.
It is strange that when I make one of the other workflows âactiveâ the emails are sent correctly (with âRun On:â set to âNew Recordsâ, but duplicating them does not allow me to duplicate the same results in a new workflow?
When you enter the Workflow module, an option appears on the left sidebar menu, called âView Process Auditâ. Sometimes you find a hung job there, and it confuses Workflows. And there might be other clues by looking at that data.
Finally, consider also if you might have a âRepeated runsâ misconfiguration. If this is not checked, and the Workflow has already run for a given record, it wonât run again (by design).
I eventually figured out (after finding a post from John-EZS #55318) that some of the âAlert emailâ Workflows were firing before my âName Stampâ Workflow, and some were firing after. Those that fire after, no longer consider the new Lead record as âNewâ, because it has been changed by the âName Stampâ Workflow.
According to John-EZS, the sequence of Workflow âfiringâ is determined by the Workflow ID, and that is exacly what is happening in our case too
Ok. If it helps to know this, SuiteCRM ids can be anything, they donât have to follow that format like â8602ef08-daf1-ba8c-7e77-58ee0bc96451â.
So I guess you could change it to âzzzzzzzz-daf1-ba8c-7e77-58ee0bc96451â to make sure it runs last. But be careful approaching any changes in the DB; you need to think if this id is used in any related tables,that relationship will break. This might, or might not be a problem, itâs up to you to evaluate.
You should be ok if you just create a new empty workflow, then edit itâs id, and only afterwards you add conditions and actions, and start running it.