Disable Assignment Notification On Module In SugarCRM

How can I disable assignment notifications for a particular custom module in SugarCRM?

Eg. When I create a new Case or Task and assign it to a User, the User receives an email about the assignment. If I turn off "Assignment Notifications" through Email Settings > Email Options in admin panel, it turns off all notifications. But in this case I want to turn off only Task Notifications and not Case or any other.

Parents
  • Vignesh V mentioned extending the module's bean above. I made an example of how a developer might do this.

    Before considering applying any modifications to SugarBeans, I urge extreme caution. Altering existing logic in beans can have negative effects.

    I made the attached Module Loadable package that extends the Products(QLIs) module's bean to turn off assignment notifications for only this module. I achieved this by simply overriding the send_assignment_notifications method as an empty method that does nothing.

    This package contains the following to files:

    custom/modules/Products/Product.php

    <?php
    require_once('modules/Products/Product.php');
    class CustomProduct extends Product
    {
    function send_assignment_notifications($notify_user, $admin) {
    }
    }



    custom/Extension/application/Ext/Include/customProductBean.php

    <?php
    $objectList['Products'] = 'Product';
    $beanList['Products'] = 'CustomProduct';
    $beanFiles['CustomProduct'] = 'custom/modules/Products/Product.php';

    Note: Sorry for the multiple edits/alerts for this. Initially linked wrong package to response.

  • Hi Patrick McQueen,

    What is file name where we will get default send_assignment_notifications function code?

Reply Children