Workflow. Send email. Custom module

Hey,

Thanks for the reply!

There are some guides on how to add the Email functionality to Custom Modules

However, I’m not sure if that’ll fully resolve your issue

It seems that the “Record Email” option appears for certain module types
(Company and Person)
In a function “getEmailableModules()” in aow_utils.php


Out of curiosity, what type of module is your custom module?

I assume it is neither Company or Person, if you cannot see the option?

(I believe that Company and Person are two Custom module types that come with the OOTB Email Functionality built in to the Module Template.)


Off of the top of my head, I can think of some options from here
(Unless Cherub-chum or yourself can think of anything else?):

  • Like cherub-chum said, you could look into making changes to aow_utils, to append your module to the $emailableModules array that is created

  • If your Custom Module doesn’t have much data, you could re-create it as a Customer/Person type (If you feel that is appropriate)

  • Or, you could instead create a Logic Hook, rather than a Workflow?
    A logic hook would allow you to send to the Email address, as you could simply grab the contents of the Text field, and use it as the address

Some links re: Logic Hooks:
https://docs.suitecrm.com/developer/logic-hooks/

https://johndopenotes.wordpress.com/2013/03/26/sugarcrm-send-email-with-attachment-using-sugarphpmailer-class/

https://community.suitecrm.com/t/custom-module-cant-send-emails-on-logic-hook/65728

1 Like