Call reminder email notification template

Hello,

Is there an upgrade safe way of adding new custom fields to the email template for call reminders?

I can access the template in include/language/en_us.notify_template.html and customize it by creating custom/include/language/en_us.notify_template.html with the new text and fields. The new text works in the reminder emails, but field values don't (they show as empty). Is there a way to get the field values to work?

Kind regards,

Miska

  • This can be accomplished by extending the Class of target module (Calls) and override the method set_notification_body accordingly.

    Create an extended Include with content like that:

    Fullscreen
    1
    2
    3
    $objectList['Calls'] = 'Call';
    $beanList['Calls'] = 'CustomCall';
    $beanFiles['CustomCall'] = 'custom/modules/Calls/Call.php';
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Create file custom/modules/Calls/Call.php with content like that, and implement overridden method accordingly:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    class CustomCall extends Call {
    function set_notification_body($xtpl, $call) {
    $xtpl = parent::set_notification_body($xtpl, $call);
    // add your code here
    return $xtpl;
    }
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • I believe in 10.1 this is a standard Email template and no longer uses the language file(s).

    See https://support.sugarcrm.com/Documentation/Sugar_Versions/10.1/Sell/Sugar_10.1.0_Release_Notes/

    • Additional configurable system email templates : Additional system email templates are now available to configure via Emails > View Email Templates: "Assignment Notification Emails", "Call Notifications Emails", "Meeting Notifications Emails", "Scheduled Report Emails".
  • Hi André,

    Thanks for your reply. Just to clarify, I'm under the impression that set_notification_body() in Call class is used for the assignment notifications but not for the email reminders. Am I mistaken?

    Users can request an email reminder (or a pop-up reminder) before a call starts when editing a call:

    At least the reminder email uses a different template than the assignment notification email.

    Kind regards,

    Miska

  • Hi Jeff,

    Thanks for your reply. There seem to be email templates for Call assignment notifications and Call invitations in "Emails" -> "Email templates" in 10.1 and later. Out of the box there isn't one for Call reminder emails and the reminder email content doesn't match either of those templates. Can I create a template for the reminder emails in "Emails" -> "Email templates"? How does Sugar determine which email template to use for each functionality?

    Users can request an email reminder (or a pop-up reminder) before a call starts when editing a call:

    Kind regards,

    Miska