Workflow Condition on Related Module Not Triggering in SuiteCRM

Hello,

I am facing an issue with the default Workflow functionality in SuiteCRM.

Setup:

  • I created a Workflow on the Leads module.
  • The condition for the Workflow is set on a related module, Notes.
  • The relationship between Leads and Notes is the default one-to-many (one Lead can have many Notes).

Workflow Condition:

  • Module: Notes
  • Field: Subject
  • Operator: equals
  • Value: “Test Note”

Workflow Action:

  • Update the Lead’s status to Rejected.

Steps to reproduce:

  1. Save the Workflow on the Lead module with the above condition and action.
  2. Go to a Lead record.
  3. Add a new Note from the Notes subpanel of the Lead detail view.
  4. Set the Note’s Subject field to “Test Note” (matching the Workflow condition).
  5. Save the Note.

Issue:

  • The Workflow does not trigger.
  • I have double-checked the Note subject and there are no typos.
  • The Lead status does not update as expected.

Additional info:

  • The Workflow seems not to fire on conditions related to any related module.
  • I tested the same scenario on SuiteCRM 7.14.x and encountered the same issue.

Could you please advise if this is a known limitation or bug? Is there a way to get Workflows to trigger based on conditions in related modules like Notes?

Thank you in advance for your help!

Hello Muhammad,

the trigger / workflow module needs to be with the notes - since at the point of saving the note, you only have a trigger in the note module.

Give this one a try, that works smoothly here:

1 Like

Hi @BastianHammer ,

Thank you for your previous assistance. The solution you provided is working well. I have a new scenario and would appreciate your guidance.

Setup:

  • I created a workflow on the Documents module.
  • The workflow condition is set on the Documents module.
  • My goal is not to trigger the workflow when a new Document record is created, but rather when an existing Document record is related to a Contact.
  • The workflow action should update a field in the Contacts module.
  • The relationship between Documents and Contacts is the default many-to-many.

Workflow Condition:

  • Module: Documents
  • Field: Document Name
  • Operator: equals
  • Value: “Test Document”

Workflow Action:

  • Update the Contact’s Address to “Test Address”.

Steps to reproduce:

  1. Save the workflow on the Documents module with the above condition and action.
  2. Open a Contact record.
  3. From the Documents subpanel in the Contact detail view, relate an existing Document record with the name “Test Document” to the Contact.

Issue:

  • The workflow does not trigger when relating an existing Document to the Contact.
  • It only triggers when a new Document is created with the name “Test Document”.

Could you please advise if there is a way to trigger the workflow when an existing Document is related to a Contact, not just on document creation?

Thank you in advance for your help!

That doesn’t work in this way - unfortunately.

You can imagine, that there are 3 database tables involved (to simply it a bit):

  1. Documents
  2. Contacts
  3. Relationships

You can trigger a workflow for something happening in Documents and Contacts.
But not in the Relationships.

There are two possible workarounds:

  1. You can try to switch your workflow to run in the scheduler. So it’s always triggered by the cron job.
  1. You could build a mapping module like: Contact Documents Details and create records there with relationships to both modules. The workflow trigger would the be triggered by the mapping module itself.

  2. Depending on how far you want to take it, you could write custom code / logic hooks or use a workflow automation software like n8n to handle the relationship trigger, but that would take way more effort than 1 and 2.

1 Like

@BastianHammer ,
I really appreciate it.
Thank You for your help.