MailMergeService Custom Edits

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • curiousgeorge
    Junior Member
    • Jun 2023
    • 1

    MailMergeService Custom Edits

    I am looking to add a new entity type and make a few customizations to `Espo\Modules\Crm\Tools\Campaign\MailMergeService` . I tried to create the following:


    PHP Code:
    <?php
    namespace Espo\Custom\Tools\Campaign;
    
    class MailMergeService extends Espo\Modules\Crm\Tools\Campaign\MailMergeService​
    
    ** my custom code here **
    This file is under `custom/Espo/Custom/Tools/Campaign/MailMergeService.php`. I had followed the advice from here: https://forum.espocrm.com/forum/deve...custom-folders


    But i'm not able to get espo to pick up and use my new custom mail merge service. Am i missing something?
    Hello, I am looking for information. Is there some documentation page about the "custom files" mechanism? How do the '/custom' and '/client/custom'
  • yuri
    Member
    • Mar 2014
    • 8471

    #2
    Either use binding to bind a custom extended class. See in Dependency Injection documentation. But I'd recommend to create a custom API action class and call completely a copy-pasted and customized MailMergeService (don't remove the license headers). This will prevent it from breaking if we change the class in the future versions.
    Last edited by yuri; 06-23-2023, 07:20 AM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...