Let the platform do the work

Extensions

Overview

The extension framework, defined in ./ModuleInstall/extensions.php, provides the capability to modify Sugar metadata such as vardefs and layouts in a safe way that supports installing, uninstalling, enabling, and disabling without interfering with other customizations.

Application extensions are stored under ./custom/Extension/application/Ext/ and module extensions are under ./custom/Extension/modules/<module>/Ext/. The files in each of these directories are aggregated into a single file with a predefined name for the system to use. An example of this is the vardefs extension. The vardef extension directory for Accounts is located in ./custom/Extension/modules/Accounts/Ext/Vardefs/. When a module is installed, uninstalled, enabled, or disabled, the files contained in this directory are merged into ./custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php. A Quick Repair & Rebuild will also cause the files to merge.

The core extension mappings are listed in the Topics section at the bottom of this page.

Extensions Properties

Each extension contains the following properties:

Property Description
Extension Scope
  • All : Extension can be applied to the ./custom/application/ or ./custom/<module>/ directory
  • Application : Extension can only be applied to the ./custom/application/ directory
  • Module : Extension can only be applied to the ./custom/<module>/ directory
Definition Variable The variable that Sugar for utilizing the extension definition. If defined, this variable must be set with the appropriate definition properties.
Extension Directory

The directory that the extension compiles files from

  • If the customization is for the application, the extension file should be placed in ./custom/Extension/application/Ext/<extension_directory>/
  • If the customization is for a module, the extension file should be placed in ./custom/Extension/modules/<module>/Ext/<extension_directory>/
Compiled Extension File

The name of the compiled extension file

  • If the extension is for the application, the compiled file will be located in ./custom/application/Ext/<extension>/<extension>.ext.php
  • If the extension is for a module, the compiled file will be located in ./custom/modules/<module>/Ext/<extension>/<extension>.ext.php
Manifest Installdef The index of the $installdef in the manifest file for module loadable packages.

Topics