SugarCRM SupportProduct GuidesSugar DeveloperSugar Developer Guide 10.3ArchitectureExtensionsModules
This release is only available for SugarCloud customers.



The Modules extension maps additional modules in the system, typically when Module Builder deploys a module.


The following extension properties are available. For more information, please refer to the Extension Property documentation.

Property Value
Extension Scope Application
Sugar Variable $beanList, $beanFiles, $moduleList
Extension Directory ./custom/Extension/application/Ext/Include/
Compiled Extension File ./custom/application/Ext/Include/modules.ext.php
Manifest Installdef $installdefs['beans']


The following sections illustrate the various ways to implement a customization to a Sugar instance.

File System

When working directly with the filesystem, you can create a file in ./custom/Extension/application/Ext/Include/ to register a new module in the system. This extension is normally used when deploying custom modules. The example below shows what this file will look like after a module is deployed:



$beanList['cust_module'] = 'cust_module';
$beanFiles['cust_module'] = 'modules/cust_module/cust_module.php';
$moduleList[] = 'cust_module';

Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/Include/modules.ext.php.

Module Loadable Package

When building a module loadable package, you can use the $installdefs['beans'] index to install the extension file.

Installdef Properties

Name Type Description
module String The key of the module to be installed
class String The class name of the module to be installed
path String The path to the module's class
tab Boolean Whether or not the module will have a navigation tab (defaults to false)

The example below demonstrates the proper install definition that should be used in the ./manifest.php file, in order to add a custom module to the system. When using this approach, you still need to use the $installdefs['copy'] index for Module directory, however, Sugar will automatically execute the database table creation process, relationship table creation process, as well as Rebuild Extensions to reflect the new Module in the system.



$manifest = array(

$installdefs = array(
    'id' => 'Beans_Example',
    'beans' => array(
            'module' => 'cust_Module',
            'class' => 'cust_Module',
            'path' => 'modules/cust_Module/cust_Module.php',
            'tab' => true
    'copy' => array(
            'from' => '<basepath>/Files/modules/cust_Module',
            'to' => 'modules/cust_Module'

Alternatively, you may use the $installdefs['copy'] index for copying the Modules definition file into the ./custom/Extension/application/Ext/Include/ directory. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module loadable packages, please refer to the Introduction to the Manifest page.

Last modified: 2021-01-06 23:28:41