AnsweredAssumed Answered

Creating a Custom Email Template For Custom Module

Question asked by Sharath kumar on May 11, 2017
Latest reply on May 12, 2017 by Sharath kumar

I have a Custom Module. I would like to create a email template for this module but i couldn't find the module in the "Insert Variable" drop down in "Emails->Create Email Template".

So, I have extended the Email Template class in custom folder and created a modules_override.php in include folder and added the following in the file:

$beanList ['EmailTemplates'] = 'CustomEmailTemplate';
$beanFiles ['CustomEmailTemplate'] = 'custom/modules/EmailTemplates/CustomEmailTemplate.php';

 

So now whenever i call Email Template bean, Sugar Bean is searching for CustomEmailTemplate class and in CustomEmailTemplate class i have overridden "generateFieldDefsJS" method. Now i got the module in the dropdown.

I have created an email template for that custom module. When i open a record and try to send the mail via share option, the template variables are not replacing with the record values.

how to replace the template variables with the original record values when you send the mail via share button?

I am working on Sugar 7.8

 

It would be a great help if someone has the solution.

if the procedure i am following is wrong please let me know the correct way.

 

Thanks,

Sharath Kumar

Outcomes