Method get_linked_beans() always returns empty list when triggered from Workflow

Hi,

I have set up a simple before_save logic hook for the Accounts module. When an account is saved the related contacts are retrieved using the get_linked_beans method. This works perfectly fine when manually editing and saving a record, but when using Workflow the method always returns an empty list.

I assume this is because Workflow operates asynchronously in a separate process, the SuiteCRM environment is not yet fully loaded.

Anyone has an idea where to look in order to fix this?

Thanks in advance!

Already fixed this issue. Apparently, in Workflow selecting the checkbox “Relate to Workflow Module” is not sufficient for the relationship to work in a logic hook. The solution is to add another field which contains the ID of the contact.

1 Like