I'm trying to create an Email Template for use in the Opportunities module, but the only variables that are available are from the Contacts,Lead,Target,Accounts,User, and Current User modules.
Is there a way to add modules to use variables from?
Thanks!
SugarCRM Enterprise 7.9.2.0 - On Premises
Hi John Bievenour,
You should look out for generateFieldDefsJS() function in EmailTemplate.php file (modules/EmailTemplates) and initialize opportunity module bean there.
Then, in EditView.php, look out for $dropdown variable and add "Opportunities" as one of the options to existing list.
To make these changes upgrade safe, you need to copy EditView.php to custom/modules/EmailTemplates/EditView.php and also need to override EmailTemplate bean and then generateFieldDefsJS method. Please follow below thread to override EmailTemplate bean class.
How to override bean class in EmailTemplate?
Let us know if this helps.
Happy Holidays !
Regards.
Hats