Problem customizing module Notes bean.

Hi everyone,

I have a legacy SugarCRM application that, at some point, creates customizations in the Note class. The solution for old developers was to fully copy the Note.php file from the modules to the custom/modules directory. I've tried to create a proper CustomNote class, as explained in the SugarCRM documentation:

SugarCRM Developer Guide

Everything works fine, but these changes have caused email attachments to stop working. I've discovered that in the class "modules/Mailer/AttachmentPeer.php," there is a switch statement that searches for the class name. Now, for me, the class name is not "Note" but "CustomNote," and the switch statement fails.

I've simply copied the full Note class from the modules directory and added my methods to make it work again. However, I would like to know if there is a better solution for this problem—one that doesn't require me to copy the entire Note.php file to the custom directory and then add my methods with each new release.

Thanks in advance,