pgr
2 October 2023 15:41
6
Hi @ViralAgency I just came across your Github issue here
opened 10:03PM - 18 Apr 23 UTC
closed 03:42PM - 02 Oct 23 UTC
Status:Requires Updates
Status:Needs Assessed
Hello everyone,
I'm looking for someone to help me understand why my customized… default class (Lead.php) in the /custom/module/Leads folder is not considered by SuiteCRM 7 despite the documentation says that this is the correct way to proceed with the upgrades, while, left in place, it works correctly.
What is the correct way to upgrade safe while keeping the custom classes?
#### Expected Behavior
According to the documentation, poor in this regard, the file should replace the one present in the default module.
#### Actual Behavior
The framework works correctly but the changes in the folder /custom/modules/Leads/Lead.php are not performed.
#### Possible Fix
Include /custom/modules/ files in rebuild and repair.
#### Steps to Reproduce
1. Try to customize any default class
2. Move that class into corresponding folder in /custom/modules/
3. Perform the Quick repair
4. Check if the code is executed
#### Context
I try to perform a Safe Upgrade.
My opinion is that this bug has medium relevance.
#### Your Environment
Docker Container with Ubuntu 22.04
Apache Webserver
PHP 7.4
SuiteCRM 7.13
Chrome
Since i feel that is better suited to the forums, since it’s not confirmed to be about a SuiteCRM bug, I will close the issue there and give you an answer here.
I believe you’re not using the correct extension mechanism - there are a few, and sometimes it gets confusing, or is poorly documented. For bean class files you should be trying something similar to this:
I know this is an old thread, but I just had to solve this problem and I’d like to leave the answer here for future reference:
Create this file (and any missing subdirectories):
custom/Extension/application/Ext/Include/CustomEmailMan.php
With these contents:
<?php
$customBeanList['EmailMan'] = 'CustomEmailMan';
$customObjectList['EmailMan'] = 'CustomEmailMan';
$customBeanFiles['EmailMan'] = 'custom/modules/EmailMan/CustomEmailMan.php';
?>
Then in custom/modules/EmailMan/CustomEmailMan.php, …
1 Like