id
stringlengths
14
16
text
stringlengths
33
5.27k
source
stringlengths
105
270
b5fe9c4d7611-5
Modules The Modules layout, located in ./clients/base/layouts/sidebar-nav-item-group-modules/sidebar-nav-item-group-modules.js, contains the logic to load modules metadata, build the module list and display them accordingly depending on the Sidebar/Rail state (expanded or collapsed) as well as respect the Pinned Items and order it should be displayed. To customize this component, you can create your own by extending it at ./custom/Extension/application/Ext/custom/clients/base/layouts/sidebar-nav-item-group-modules/sidebar-nav-item-group-modules.js, to reference your own custom logic and make sure you extend from the view SidebarNavItemModuleView or layout SidebarNavItemGroupModulesLayout     if (isset($viewdefs['<module>']['base']['menu']['header'])) { foreach ($viewdefs['<module>']['base']['menu']['header'] as $key => $moduleAction) { //remove the link by label key if (in_array($moduleAction['label'], array('<link label key>'))) { unset($viewdefs['<module>']['base']['menu']['header'][$key]); } } } Once you have created the extension files, navigate to Admin > Repair > Quick Repair and Rebuild. This will remove the menu action item from the existing list of links.   Profile Action Links Profile actions are the links listed under the user's profile menu on the right side of the Top Header. Profile action extension files are located in ./custom/Extension/application/Ext/clients/base/views/profileactions/ and are compiled into  ./custom/application/Ext/clients/base/views/profileactions/profileactions.ext.php. Adding Profile Action Links
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/MainLayout/index.html
b5fe9c4d7611-6
Adding Profile Action Links The example below demonstrates how to add a profile action link to the Styleguide. To define your own profile action link, create your own label extension for the link's display label.  ./custom/Extension/application/Ext/Language/en_us.addProfileActionLink.php <?php //create the links label $app_strings['LNK_STYLEGUIDE_C'] = 'Styleguide'; Next, create the profile action link extension: ./custom/Extension/application/Ext/clients/base/views/profileactions/addProfileActionLink.php <?php $viewdefs['base']['view']['profileactions'][] = array( 'route' => '#Styleguide', 'label' => 'LNK_STYLEGUIDE_C', 'icon' => 'icon-link', ); Once you have created the extension files, navigate to Admin > Repair > Quick Repair and Rebuild. This will append your profile action item to the existing list of links. Note: You may need to refresh the page to see the new profile menu items. Removing Profile Action Links To remove a profile action link, loop through the list of profile actions and remove the item by one of its properties. For your reference, the stock profile actions can be found in ./clients/base/views/profileactions/profileactions.php. ./custom/Extension/application/Ext/clients/base/views/profileactions/removeProfileActionLink.php <?php if (isset($viewdefs['base']['view']['profileactions'])) { foreach ($viewdefs['base']['view']['profileactions'] as $key => $profileAction) { //remove the link by label key if (in_array($profileAction['label'], array('LNK_ABOUT'))) { unset($viewdefs['base']['view']['profileactions'][$key]); } } }
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/MainLayout/index.html
b5fe9c4d7611-7
} } } Once you have created the extension files, navigate to Admin > Repair > Quick Repair and Rebuild. This will remove the profile action item from the existing list of links. Note: You may need to refresh the page to see the profile menu items removed. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/MainLayout/index.html
324948df69ba-0
Drawers Overview The drawer layout widget, located in ./clients/base/layouts/drawer/, is used to display a window of additional content to the user. This window can then be closed to display the content the user was previously viewing. Methods app.drawer.open(layoutDef, onClose) The app.drawer.open(layoutDef, onClose) method displays a new content window over the current view. Parameters Name Required Description layoutDef.layout yes The id of the layout to load. layoutDef.context no Additional data you would like to pass to the drawer. Data passed in can be retrieved from the view using: this.context.get('<data key>'); Note: Be very careful about what you pass in as data to the drawer. As the data is passed in by reference, when the drawer is closed, the context is destroyed. onClose no Optional callback handler for when the drawer is closed. Example app.drawer.open({ layout: 'my-layout', context: { myData: data }, }, function() { //on close, throw an alert alert('Drawer closed.'); }); app.drawer.close(callbackOptions) The app.drawer.close(callbackOptions) method dismisses the topmost drawer. Parameters Name Required Description callbackOptions no Any parameters passed into the close method will be passed to the callback. Standard Example app.drawer.close(); Callback Example //open drawer app.drawer.open({ layout: 'my-layout', }, function(message1, message2) { alert(message1); alert(message2); }); //close drawer app.drawer.close('message 1', 'message 2'); app.drawer.load(options) Loads a new layout into an existing drawer. Parameters Name Description options.layout
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/Drawers/index.html
324948df69ba-1
Loads a new layout into an existing drawer. Parameters Name Description options.layout The id of the layout to load. Example app.drawer.load({ layout: 'my-second-layout', }); app.drawer.reset(triggerBefore) The app.drawer.reset(triggerBefore) method destroys all drawers at once. By default, whenever the application is routed to another page, reset() is called. Parameters Name Required Description triggerBefore no Determines whether to triggerBefore. Defaults to false. Example app.drawer.reset(); Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/Drawers/index.html
69766d6cc067-0
Fields   Overview Fields are component plugins that render and format field values. They are made up of a controller JavaScript file (.js) and at least one Handlebars template (.hbt). For more information regarding the data handling of a field, please refer the data framework fields documentation. For information on creating custom field types, please refer the Creating Custom Field Types cookbook example. Hierarchy Diagram The field components are loaded in the following manner: Note: The Sugar application's client type is "base". For more information on the various client types, please refer to the User Interface page. Field Example The bool field, located in ./clients/base/fields/bool/, handles the display of checkbox boolean values. The sections below outline the various files that render this field type. Controller The bool.js, file is shown below, overrides the base _render function to disable the field. The format and unformat functions handle the manipulation of the field's value. ./clients/base/fields/bool/bool.js ({ _render: function() { app.view.Field.prototype._render.call(this); if(this.tplName === 'disabled') { this.$(this.fieldTag).attr("disabled", "disabled"); } }, unformat:function(value){ value = this.$el.find(".checkbox").prop("checked") ? "1" : "0"; return value; }, format:function(value){ value = (value=="1") ? true : false; return value; } }) Attributes Attribute Description _render Function to render the field. unformat Function to dynamically check the checkbox based on the value. format Function to format the value for storing in the database. Handlebar Templates
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/Fields/index.html
69766d6cc067-1
format Function to format the value for storing in the database. Handlebar Templates The edit.hbs file defines the display of the control when the edit view is used. This layout is for displaying the editable form element that renders a clickable checkbox control for the user. ./clients/base/fields/bool/edit.hbs {{#if def.text}} <label> <input type="checkbox" class="checkbox"{{#if value}} checked{{/if}}> {{str def.text this.module}} </label> {{else}} <input type="checkbox" class="checkbox"{{#if value}} checked{{/if}}> {{/if}} Helpers Helpers Description str Handlebars helper to render the label string. The detail.hbs file defines the display of the control when the detail view is used. This layout is for viewing purposes only so the control is disabled by default. ./clients/base/fields/bool/detail.hbs <input type="checkbox" class="checkbox"{{#if value}} checked{{/if}} disabled> The list.hbs file defines the display of the control when the list view is used. This view is also for viewing purposes only so the control is disabled by default. ./clients/base/fields/bool/list.hbs <input type="checkbox" class="checkbox"{{#if value}} checked{{/if}} disabled> Cookbook Examples When working with fields, you may find the follow cookbook examples helpful: Creating Custom Field Types Converting Address' Country Field to a Dropdown Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/User_Interface/Fields/index.html
6cea69957584-0
Architecture Overview This section of Sugar's Developer Guide begins with a high-level overview of the Sugar platform's architecture and contains documentation on granular concepts in Sugar such as logic hooks, caching, logging, extensions, job queue, and more. Please continue to the bottom of this page or use the navigation on the left to explore the related content. Platform Sugar® is built on open standards and technology such as HTML5, PHP, and JavaScript, and runs on a variety of free and open-source technology like Linux, MySQL, and Elasticsearch. The Sugar platform also supports common proprietary databases such as Oracle, IBM DB2, and Microsoft SQL Server. All of Sugar's customers and partners have access to source code that they can choose to deploy on-premise or utilize Sugar's cloud service for a SaaS deployment. Out of the box, Sugar uses a consistent platform across all clients and devices (e.g. mobile, web, plug-ins, etc.). Front-End Framework Our clients are based on a front-end framework called Sidecar. Sidecar is built on open source technology: Backbone.js, jQuery, Handlebars.js, and Bootstrap. The Sidecar framework provides a responsive UI (to support a variety of form factors) and uses modern, single-page client architecture. Sugar clients connect to Sugar server application via our client REST API. The REST API is implemented in PHP and drives server-side business logic and interacts with a database. If it can be accomplished via one of our clients, then its equivalent functionality can be accomplished using our REST API. The Sugar platform uses modules. Modules are a vertically integrated application component that is traditionally organized around a single feature or record type (or underlying database table). For example, contact records are managed via a Contacts module that contains all the business logic, front-end interface definitions, REST APIs, data schema, and relationships with other modules.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-1
Custom modules can be created and deployed as needed in order to add new features to a Sugar application instance.  Metadata Sugar's modules are defined primarily using Metadata. There are two types of metadata definitions within Sugar: Vardefs, which define the data model for Sugar modules; and Viewdefs, which define the user interface components that are used with a module. Sugar Metadata is implemented as PHP files that can be modified directly by a Sugar Developer making filesystem changes, or indirectly through the use of Sugar Studio and Module Builder by a Sugar Administrator. Metadata allows you to configure solutions instead of having to write countless lines of custom code in order to implement common customizations such as adding custom fields, calculated values, and changing user interface layouts. Extensions Beyond metadata, Sugar is highly customizable and includes an extensive Extensions Framework that provides Sugar Developers the capability to contribute to pre-defined extension points within the application in a way that is upgrade-safe and will not conflict with other customizations that exist in the system.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-2
TopicsAutoloaderThe autoloader is an API that allows the unified handling of customizations and customizable metadata while reducing the number of filesystem accesses and improving performance.CachingMuch of Sugar's user interface is built dynamically using a combination of templates, metadata and language files. A file caching mechanism improves the performance of the system by reducing the number of static metadata and language files that need to be resolved at runtime. This cache directory stores the compiled files for JavaScript files, Handlebars templates, and language files.UploadsThe upload directory is used to store files uploaded for imports, attachments, documents, and module loadable packages.EmailOutlines the relationships between emails, email addresses, and bean records.Email AddressesRecommended approaches when working with email addresses in Sugar.LoggingThere are two logging systems implemented in the Sugar application: SugarLogger and PSR-3. PSR-3 is Sugar's preferred logger solution and should be used going forward.Logic HooksThe Logic Hook framework allows you to append actions to system events such as when creating, editing, and deleting records.LanguagesSugar as an application platform is internationalized and localizable. Data is stored and presented in the UTF-8 codepage, allowing for all character sets to be used. Sugar provides a language-pack framework that allows developers to build support for any language in the display of user interface labels. Each language pack has its own set of display strings which is the basis of language localization. You can add or modify languages using the information in this guide.ExtensionsThe 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.FiltersFilters are a way to predefine searches on views that render a list of records such as list views, pop-up searches, and lookups. This page explains how to implement the various types of filters for record list views.Duplicate CheckThe duplicate-check framework provides the capability
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-3
implement the various types of filters for record list views.Duplicate CheckThe duplicate-check framework provides the capability to alter how the system searches for duplicate records in the database when creating records. For information on duplicate checking during imports, please refer to the index documentation.Elastic SearchThe focus of this document is to guide developers on how Sugar integrates with Elastic Search.Global SearchHow to customize the global search results.Sugar LogicSugar Logic, a feature in all Sugar products, enables custom business logic that is easy to create, manage, and reuse on both the server and client.AdministrationThe Administration class is used to manage settings stored in the database config table.ConfiguratorThe Configurator class, located in ./modules/Configurator/Configurator.php, handles the config settings found in ./config.php and ./config_override.php.Module LoaderModule Loader is used when installing customizations, plugins,language packs, and hotfixes, and other customizations into a Sugar instance in the form of a Module Loadable Package. This documentation covers the basics and best practices for creating module loadable packages for a Sugar installation.Module BuilderThe Module Builder tool allows programmers to create custom modules without writing code and to create relationships between new and existing CRM modules. To illustrate how to use Module Builder, this article will show how to create and deploy a custom module.QuotesAs of Sugar 7.9.0.0, the quotes module has been moved out of Backward Compatibility mode into Sidecar. Customizations to the Quotes interface will need to be rewritten for the new Sidecar framework as an automated migration of these customizations is not possible. This document will outline common customizations and implementation methods.SugarBPMSugarBPM™ automation suite is the next-generation workflow management tool for Sugar. Introduced in 7.6, SugarBPM is loosely based on BPMN process notation standards and provides a simple drag-and-drop user interface along with an intelligent flow designer to allow for the creation of easy yet powerful process
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-4
user interface along with an intelligent flow designer to allow for the creation of easy yet powerful process definitions.Entry PointsEntry points, defined in ./include/MVC/Controller/entry_point_registry.php, were used to ensure that proper security and authentication steps are applied consistently across the entire application. While they are still used in some areas of Sugar, any developers using custom entry points should adjust their customizations to use the latest REST API endpoints instead.Job QueueThe Job Queue executes automated tasks in Sugar through a scheduler, which integrates with external UNIX systems and Windows systems to run jobs that are scheduled through those systems. Jobs are the individual runs of the specified function from a scheduler.Access Control ListsAccess Control Lists (ACLs) are used to control access to the modules, data, and actions available to users in Sugar. By default, Sugar comes with a default ACL Strategy that is configurable by an Admin through the Roles module via Admin > Role Management. Sugar also comes with other ACL strategies that are located in the ./data/acl/ folder, and are used in other parts of the system such as the Administration module, Emails module, Locked Fields functionality, and many others. They can also be leveraged by customizations and custom ACL strategies can be implemented to control your own customizations.TeamsTeams provide the ability to limit access at the record level, allowing sharing flexibility across functional groups. Developers can manipulate teams programmatically provided they understand Sugar's visibility framework.TagsThe tagging feature allows a user to apply as many "tags" as they choose on any record they want to categorize. This allows the user to effectively group records together from any source within the application and relate them together. Please note that the tag field and Tags module do not support customization at this time.TinyMCEThis section contains information about working with the TinyMCE editor in Sugar.SugarPDFThis section contains information on generating PDFs and configuring PDF settings and fonts in Sugar.DateTimeThe SugarDateTime class, located in,
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-5
generating PDFs and configuring PDF settings and fonts in Sugar.DateTimeThe SugarDateTime class, located in, ./include/SugarDateTime.php, extends PHP's built in DateTime class and can be used to perform common operations on date and time values.ShortcutsShortcuts is a framework to add shortcut keys to the application. When shortcut keys are registered, they are registered to a particular shortcut session. Shortcut sessions group shortcut keys, and they can be activated, deactivated, saved, and restored. Global shortcut keys can be registered, but they are not tied to a particular shortcut session. They are rather applied everywhere in the application and can only be applied once.ThemesHow to customize the Sugar theme.Web AccessibilityLearn about the Sugar Accessibility Plugin for Sidecar.Validation ConstraintsThis article will cover how to add validation constraints to your custom code.CLISugar on-premise deployments include a command line interface tool built using the Symfony Console Framework. Sugar's CLI is intended to be an administrator or developer level power tool to execute PHP code in the context of Sugar's code base. These commands are version specific and can be executed on a preinstalled Sugar instance or on an installed Sugar instance. Sugar's CLI is not intended to be used as a tool to interact remotely with an instance nor is it designed to interact with multiple instances.Performance TuningThe Performance Tuning section contains information that will help maximize system performance for your Sugar instance.Backward CompatibilityAs of Sugar® 7, modules are built using the Sidecar framework. Any modules that still use the MVC architecture and have not yet migrated to the Sidecar framework are set in what Sugar refers to as "backward compatibility" (BWC) mode.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
6cea69957584-6
Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/index.html
cd28755f551c-0
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
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html
cd28755f551c-1
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.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html
cd28755f551c-2
TopicsActionFileMapThe ActionFileMap extension maps actions to files, which helps you map a file to a view outside of ./custom/modules/<module>/views/view.<name>.php. This page is only applicable to modules running in backward compatibility mode.ActionReMapThe ActionReMap extension maps new actions to existing actions. This extension is only applicable to modules running in backward compatibility mode.ActionViewMapThe ActionViewMap extension maps additional actions for a module.AdministrationThe Administration extension adds new panels to Sugar's Administration page.Application SchedulersApplication Scheduler extensions add custom functions that can be used by scheduler jobs.ConsoleThe Console extension adds custom CLI commands to Sugar. More information on creating custom commands can be found in the CLI documentation.DependenciesDependencies create dependent actions for fields and forms that can leverage more complicated logic.EntryPointRegistryThe EntryPointRegistry extension maps additional entry points to the system. Please note that entry points will soon be deprecated. Developers should move custom logic to endpoints. For more information, please refer to the Entry Points page.ExtensionsThis extension allows for developers to create custom extensions within the framework. Custom extensions are used alongside the extensions found in ./ModuleInstaller/extensions.php.FileAccessControlMapThe FileAccessControlMap extension restricts specific view actions from users of the system.IncludeThe Modules extension maps additional modules in the system, typically when Module Builder deploys a module.JSGroupingsThe JSGroupings extension allows for additional JavaScript grouping files to be created or added to existing groupings within the system.LanguageThe Language extension adds or overrides language strings.LayoutdefsThe Layoutdefs extension adds or overrides subpanel definitions.LogicHooksThe LogicHooks extension adds actions to specific events such as, for example, before saving a bean. For more information on logic hooks in Sugar, please refer to the Logic Hooks documentation.ModulesThe Modules extension maps additional modules in the system, typically when Module Builder deploys a module.PlatformsThe Platforms extension adds allowed REST API platforms when restricting custom platforms through the use of the disable_unknown_platforms
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html
cd28755f551c-3
Platforms extension adds allowed REST API platforms when restricting custom platforms through the use of the disable_unknown_platforms configuration setting.ScheduledTasksThe ScheduledTasks extension adds custom functions that can be used by scheduler jobs. For more information about schedulers in Sugar, please refer to the Schedulers documentation.SidecarThe Sidecar extension installs metadata files to their appropriate directories.TinyMCEThe TinyMCE extension affects the TinyMCE WYSIWYG editor's configuration for backward compatible modules such as PDF Manager and Campaign Email Templates.UserPageThe UserPage extension adds sections to the User Management view.UtilsThe Utils extension adds functions to the global utility function list.VardefsThe Vardefs extension adds or overrides system vardefs, which provide the Sugar application with information about SugarBeans.WirelessLayoutdefsThe WirelessLayoutdefs extension adds additional subpanels to wireless views. This extension is only applicable to modules running in backward compatibility mode.WirelessModuleRegistryThe WirelessModuleRegistry extension adds modules to the available modules for mobile.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html
cd28755f551c-4
Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html
0de4b2b31aa9-0
This page refers to content that is only available in modules running in backward compatibility mode. ActionFileMap Overview The ActionFileMap extension maps actions to files, which helps you map a file to a view outside of ./custom/modules/<module>/views/view.<name>.php. This page is only applicable to modules running in backward compatibility mode. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $action_file_map Extension Directory ./custom/Extension/modules/<module>/Ext/ActionFileMap/ Compiled Extension File ./custom/<module>/Ext/ActionFileMap/action_file_map.ext.php Manifest Installdef $installdefs['action_file_map'] Implementation 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/modules/<module>/Ext/ActionFileMap/ to map a new action in the system. The following example will create a new action called "example" in a module: ./custom/Extension/modules/<module>/Ext/ActionFileMap/<file>.php <?php $action_file_map['new_action'] = 'custom/modules/<module>/new_action.php'; Next, create your action file: ./custom/modules/<module>/new_action.php <?php //Encoded as JSON for AJAX layouts echo '{"content":"Example View"}'; ?> Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/ActionFileMap/action_file_map.ext.php Module Loadable Package When building a module-loadable package, you can use the $installdefs['action_file_map'] index to install the extension file.Â
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html
0de4b2b31aa9-1
Installdef Properties Name Type Description from String The basepath of the file to be installed.  to_module String The key of the module the file is to be installed to. The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Action File Map file to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the Action file, but Sugar will automatically execute Rebuild Extensions to reflect the new Action in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'ActionRemap_Example', 'action_file_map' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/ActionFileMap/<file>.php', 'to_module' => '<module>', ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/example.php', 'to' => 'custom/example.php' ) ) ); Alternatively, you may use the $installdefs['copy'] index for the Action File Map Extension file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html
cae115c73927-0
This page refers to content that is only available in modules running in backward compatibility mode. WirelessLayoutdefs Overview The WirelessLayoutdefs extension adds additional subpanels to wireless views. This extension is only applicable to modules running in backward compatibility mode. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $layout_defs Extension Directory ./custom/Extension/modules/<module>/Ext/WirelessLayoutdefs/ Compiled Extension File ./custom/<module>/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php Manifest Installdef $installdefs['wireless_subpanels'] Implementation 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/modules/<module>/Ext/WirelessLayoutdefs/ to add a subpanel to a module in the system. The following example will add a new subpanel to a specified module: ./custom/Extension/modules/<module>/Ext/WirelessLayoutdefs/<file>.php <?php $layout_defs['<module>']['subpanel_setup']['<subpanel module>'] = array( 'order' => 10, 'module' => '<subpanel module>', 'get_subpanel_data' => '<subpanel name>', 'title_key' => 'LBL_SUBPANEL_TITLE', ); Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/WirelessLayoutdefs/wireless.subpaneldefs.ext.php. Module Loadable Package When building a module loadable package, you can use the $installdefs['wireless_subpanels'] index to install the extension file.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/WirelessLayoutdefs/index.html
cae115c73927-1
Installdef Properties Name Type Description from String The base path of the file to be installed to_module String The key for the module where the file will be installed The example below will demonstrate the proper install definition that should be used in the ./manifest.php file in order to add the subpanel file to a specific module. You should note that when using this approach Sugar will automatically execute Rebuild Extensions to reflect the subpanel in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'wirelessLayoutdefs_Example', 'wireless_subpanels' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/WirelessLayoutdefs/<file>.php', 'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/WirelessLayoutdefs/index.html
b7a86d4ba843-0
Modules Overview The Modules extension maps additional modules in the system, typically when Module Builder deploys a module. Properties 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'] Implementation 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: ./custom/Extension/application/Ext/Include/<file>.php <?php $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)
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Modules/index.html
b7a86d4ba843-1
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.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'Beans_Example', 'beans' => array( array( 'module' => 'cust_Module', 'class' => 'cust_Module', 'path' => 'modules/cust_Module/cust_Module.php', 'tab' => true ) ), 'copy' => array( 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Modules/index.html
12e32d91212b-0
Language Overview The Language extension adds or overrides language strings. This extension is applicable to both the application and module framework. For more information, please refer to the Language Framework page. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope All - Application & Module Sugar Variables If adding language files to application:$app_strings / $app_list_strings  If adding language files to <module>:$mod_strings Extension Directory Application: ./custom/Extension/application/Ext/Language/ Module: ./custom/Extension/modules/<module>/Ext/Language/ Compiled Extension File Application: ./custom/application/Ext/Language/<language_key>.lang.ext.php Module: ./custom/modules/<module>/Ext/Language/<language_key>.lang.ext.php Manifest Installdef $installdefs['language']   Implementation The following sections illustrate the various ways to implement a customization to a Sugar instance. File System Creating New Application Label When working directly with the filesystem, you can create a file in ./custom/Extension/application/Ext/Language/ to add Labels for languages to the system. The following example will add a new Label 'LBL_EXAMPLE_LABEL' to the system:  ./custom/Extension/application/Ext/Language/<language>.<file>.php <?php $app_strings['LBL_EXAMPLE_LABEL'] = 'Example Application Label'; Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into./custom/application/Ext/Language/<language>.lang.ext.php Creating New Module Label
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Language/index.html
12e32d91212b-1
Creating New Module Label When working directly with the filesystem, you can create a file in ./custom/Extension/modules/<module>/Ext/Language/ to add Labels for languages to a particular module. The following example will add a new Label 'LBL_EXAMPLE_MODULE_LABEL' to a module: ./custom/Extension/modules/<module>/Ext/Language/<language>.<file>.php <?php $mod_strings['LBL_EXAMPLE_MODULE_LABEL'] = 'Example Module Label'; Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/Language/<language>.lang.ext.php Module Loadable Package When building a module loadable package, you can use the $installdefs['language'] index to install the extension file.  Installdef Properties Name Type Description from String The basepath of the file to be installed.  to_module String The key of the module the file is to be installed to. language String The key of the language the file is to be installed to. The example below will demonstrate the proper install definition that should be used in the ./manifest.php file, in order to add the Language Extension file to the system. You should note that when using this approach Sugar will automatically execute Rebuild Extensions to reflect the new Labels in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'language_Example', 'language' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/Language/<language>.lang.ext.php', 'to_module' => 'application', 'language' => '<language>' ) ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Language/index.html
12e32d91212b-2
'language' => '<language>' ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Language/index.html
cb5f3331200c-0
Console Overview The Console extension adds custom CLI commands to Sugar. More information on creating custom commands can be found in the CLI documentation. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Extension Directory ./custom/Extension/application/Ext/Console/ Compiled Extension File ./custom/application/Ext/Console/console.ext.php Manifest Installdef $installdefs['console'] Implementation The following sections illustrate the various ways to implement a customization to a Sugar instance. File System To create a Sugar console extension, please refer to our CLI documentation. Module Loadable Package When building a module loadable package, you can use the $installdefs['console'] index to install the extension file. Installdef Properties Name Type Description from String The basepath of the file to be installed. The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the console command.  ./manifest.php <?php $manifest = array( ... ); $installdefs = array ( 'id' => 'console_Example', 'console' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/Console/RegisterHelloWorldCommand.php' ) ), 'copy' => array ( 0 => array ( 'from' => '<basepath>/Files/custom/src/Console/Command/HelloWorldCommand.php', 'to' => 'custom/src/Console/Command/HelloWorldCommand.php', ), ), );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Console/index.html
cb5f3331200c-1
), ), ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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. Download the module loadable example package here. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Console/index.html
bf780a13c326-0
Administration Overview The Administration extension adds new panels to Sugar's Administration page. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module: Administration Sugar Variable $admin_group_header Extension Directory ./custom/Extension/modules/Administration/Ext/Administration/ Compiled Extension File ./custom/modules/Administration/Ext/Administration/administration.ext.php Manifest Installdef $installdefs['administration'] Implementation 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/modules/Administration/Ext/Administration/<file>.php to add new Administration Links in the system. The following example will add a new panel to the Administration page called "Example Admin Panel", which will contain one link called "Example Link": The following example will create a new admin panel: ./custom/Extension/modules/Administration/Ext/Administration/<file>.php <?php $admin_option_defs = array(); $admin_option_defs['Administration']['<section key>'] = array( //Icon name. Available icons are located in ./themes/default/images 'Administration', //Link name label 'LBL_LINK_NAME', //Link description label 'LBL_LINK_DESCRIPTION', //Link URL - For Sidecar modules 'javascript:parent.SUGAR.App.router.navigate("<module>/<path>", {trigger: true});', //Alternatively, if you are linking to BWC modules //'./index.php?module=<module>&action=<action>', ); $admin_group_header[] = array( //Section header label 'LBL_SECTION_HEADER', //$other_text parameter for get_form_header() '',
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html
bf780a13c326-1
//$other_text parameter for get_form_header() '', //$show_help parameter for get_form_header() false, //Section links $admin_option_defs, //Section description label 'LBL_SECTION_DESCRIPTION' ); Next, we will populate the panel label values: ./custom/Extension/modules/Administration/Ext/Language/en_us.<name>.php <?php $mod_strings['LBL_LINK_NAME'] = 'Example Link'; $mod_strings['LBL_LINK_DESCRIPTION'] = 'Link Description'; $mod_strings['LBL_SECTION_HEADER'] = 'Example Admin Panel'; $mod_strings['LBL_SECTION_DESCRIPTION'] = 'Section Description'; Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions, compiling your customization into ./custom/modules/Administration/Ext/Administration/administration.ext.php, and the new panel will appear in the Administration section. Module Loadable Package When building a module loadable package, use the $installdefs['administration'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Administration file to the system. If you are utilizing a Language file, as recommended above, you must use the $installdefs['language'] index to install the Language definition. Using the $installdefs['administration'] index will automatically execute Rebuild Extensions to reflect the new Administration Links in the system. <?php $manifest = array( ... ); $installdefs = array( 'id' => 'administration_example', 'administration' => array( array(
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html
bf780a13c326-2
'administration' => array( array( 'from' => '<basepath>/custom/Extension/modules/Administration/Ext/Administration/<file>.php' ) ), 'language' => array( array( 'from' => '<basepath>/custom/Extensions/modules/Administration/Ext/Language/en_us.<file>.php', 'to_module' => 'Administration', 'language' =>'en_us' ) ) ); Alternatively, you may also choose to use the $installdefs['copy'] index for the Administration Link Extension file. When using this approach, you may need to manually run a repair action 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html
bab57b7c761b-0
This page refers to content that is only available in modules running in backward compatibility mode. Layoutdefs Overview The Layoutdefs extension adds or overrides subpanel definitions. Note: This extension is only applicable to modules running in backward compatibility mode. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $layout_defs Extension Directory ./custom/Extension/modules/<module>/Ext/Layoutdefs/ Compiled Extension File ./custom/<module>/Ext/Layoutdefs/layoutdefs.ext.php Manifest Installdef $installdefs['layoutdefs'] Implementation 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/modules/<module>/Ext/Layoutdefs/ to add Layout Definition files to the system. The following example will add a subpanel definition for a module relationship: ./custom/Extension/modules/<module>/Ext/Layoutdefs/<file>.php <?php $layout_defs["<module>"]["subpanel_setup"]['<subpanel key>'] = array ( 'order' => 100, 'module' => '<related module>', 'subpanel_name' => 'default', 'sort_order' => 'asc', 'sort_by' => 'id', 'title_key' => 'LBL_SUBPANEL_TITLE', 'get_subpanel_data' => '<subpanel key>', 'top_buttons' => array ( array ( 'widget_class' => 'SubPanelTopButtonQuickCreate', ), array ( 'widget_class' => 'SubPanelTopSelectButton', 'mode' => 'MultiSelect', ), ), );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Layoutdefs/index.html
bab57b7c761b-1
'mode' => 'MultiSelect', ), ), ); Please note that, if you are attempting to override parts of an existing subpanel definition, you should specify the exact index rather than redefining the entire array. An example of overriding the subpanel top_buttons index is shown below: <?php $layout_defs["<module>"]["subpanel_setup"]["<subpanel key>"]["top_buttons"] = array( array( 'widget_class' => 'SubPanelTopButtonQuickCreate', ), ); Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customizations to ./custom/modules/<module>/Ext/Layoutdefs/layoutdefs.ext.php . Module Loadable Package When building a module loadable package, you can use the $installdefs['layoutdefs'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Layout Definition Extension file to the system. When using this approach, Sugar will automatically execute Rebuild Extensions to reflect the customizations added with the Layout definition. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'layoutdefs_Example', 'layoutdefs' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/Layoutdefs/<file>.php', 'to_module' => '<module>', ) ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Layoutdefs/index.html
bab57b7c761b-2
'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Layoutdefs/index.html
8a280f97feb2-0
Utils Overview The Utils extension adds functions to the global utility function list. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Extension Directory ./custom/Extension/application/Ext/Utils/ Compiled Extension File ./custom/application/Ext/Utils/custom_utils.ext.php Manifest Installdef $installdefs['utils'] Implementation 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/Utils/ to map a new action in the system. The following example will create a new function called 'exampleUtilFunction' that can be used throughout the system: ./custom/Extension/application/Ext/Utils/<file>.php <?php function exampleUtilFunction() ' { //logic } Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and your customizations will be compiled into ./custom/application/Ext/Utils/custom_utils.ext.php . Alternatively, functions can also be added by creating ./custom/include/custom_utils.php. This method of creating utils is still compatible but is not recommended from a best practices standpoint. Module Loadable Package When building a module loadable package, you can use the $installdefs['utils'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the utils to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new utils in the system. ./manifest.php <?php $manifest = array(
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Utils/index.html
8a280f97feb2-1
./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'utils_Example', 'utils' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/Utils/<file>.php', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Utils/index.html
048816b5d49d-0
This page refers to content that is only available in modules running in backward compatibility mode. TinyMCE Overview The TinyMCE extension affects the TinyMCE WYSIWYG editor's configuration for backward compatible modules such as PDF Manager and Campaign Email Templates. To review the default configuration for TinyMCE, please refer to the code in ./include/SugarTinyMCE.php. Sidecar's TinyMCE configuration can be edited using the Sidecar Framework and editing the htmleditable_tinymce field. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $defaultConfig, $buttonConfigs, $pluginsConfig Extension Directory ./custom/Extension/application/Ext/TinyMCE/ Compiled Extension File ./custom/application/Ext/TinyMCE/tinymce.ext.php Manifest Installdef $installdefs['tinymce'] Implementation 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/TinyMCE/ to customize the TinyMCE configuration. The following example will increase the height of the TinyMCE window, remove buttons, and remove plugins from the WYSIWYG Editor: ./custom/Extension/application/Ext/TinyMCE/<file>.php <?php $defaultConfig['height'] = '1000'; $buttonConfigs['default'] = array( 'buttonConfig' => "bold,italic,underline,strikethrough,separator,bullist,numlist", 'buttonConfig2' => "justifyleft,justifycenter,justifyright,justifyfull", 'buttonConfig3' => "fontselect,fontsizeselect", );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/TinyMCE/index.html
048816b5d49d-1
'buttonConfig3' => "fontselect,fontsizeselect", ); $pluginsConfig['default'] = 'advhr,preview,paste,directionality'; Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/TinyMCE/tinymce.ext.php Module Loadable Package When building a module loadable package, you can use the $installdefs['tinymce'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file, in order to add the UserPage file to the system. You should note that when using this approach Sugar will automatically execute Rebuild Extensions to reflect the changes to TinyMCE in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'tinyMCE_Example', 'tinymce' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/TinyMCE/<file>.php', 'to_module' => 'application' ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/TinyMCE/index.html
3735c816782b-0
EntryPointRegistry Overview The EntryPointRegistry extension maps additional entry points to the system. Please note that entry points will soon be deprecated. Developers should move custom logic to endpoints. For more information, please refer to the Entry Points page. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $entry_point_registry Extension Directory ./custom/Extension/application/Ext/EntryPointRegistry/ Compiled Extension File ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php Manifest Installdef $installdefs['entrypoints'] Implementation 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/EntryPointRegistry/ to map a new entry point in the system. The following example will create a new entry point called exampleEntryPoint that will display the text, "Hello World": ./custom/Extension/application/Ext/EntryPointRegistry/<file>.php <?php $entry_point_registry['exampleEntryPoint'] = array( 'file' => 'custom/exampleEntryPoint.php', 'auth' => true ); Next, create the file that will contain the entry point logic. This file can be located anywhere you choose, but we recommend putting it in the custom directory. More information on custom entry points can be found on the Creating Custom Entry Points page. ./custom/exampleEntryPoint.php <?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); echo "Hello World!";
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/EntryPointRegistry/index.html
3735c816782b-1
echo "Hello World!"; Next, navigate to Admin > Repair > Quick Repair and Rebuild.The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php  Module Loadable Package When building a module loadable package, you can use the $installdefs['entrypoints'] index to install the extension file.  Installdef Properties Name Type Description from String The base path of the file to be installed.  The example below demonstrates the proper install definition that should be used in the ./manifest.php file, in order to add the Entry Point Extension file to the system. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the entry point's logic file, however Sugar will automatically execute Rebuild Extensions to reflect the new Entry Point in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'entryPoint_Example', 'entrypoints' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/EntryPointRegistry/<file>.php' ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/exampleEntryPoint.php', 'to' => 'custom/exampleEntryPoint.php' ) ) ); Alternatively, you may use the $installdefs['copy'] index for the Entry Point Extension file. 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.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/EntryPointRegistry/index.html
3735c816782b-2
Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/EntryPointRegistry/index.html
89ada560c2b6-0
LogicHooks Overview The LogicHooks extension adds actions to specific events such as, for example, before saving a bean. For more information on logic hooks in Sugar, please refer to the Logic Hooks documentation. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope All - Application & Module Sugar Variable $hook_array Extension Directory Application - ./custom/Extension/application/Ext/LogicHooks/ Module - ./custom/Extension/modules/<module>/Ext/LogicHooks/ Compiled Extension File Application - ./custom/application/Ext/LogicHooks/logichooks.ext.php Module - ./custom/modules/<module>/Ext/LogicHooks/logichooks.ext.php Manifest Installdef $installdefs['hookdefs'] Implementation 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/LogicHooks/ to add a new logic hook to the application. The following example will create a new before_save logic hook that executes for all modules: ./custom/Extension/application/Ext/LogicHooks/<file>.php <?php $hook_array['before_save'][] = Array( 1, 'Custom Logic', 'custom/application_hook.php', 'ApplicationHookConsumer', 'before_method' ); Next, create the hook class: ./custom/application_hook.php <?php if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); class ApplicationHookConsumer { function before_method($bean, $event, $arguments) { //logic } } ?>
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/LogicHooks/index.html
89ada560c2b6-1
{ //logic } } ?> Finally, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and the customizations will be compiled into ./custom/application/Ext/LogicHooks/logichooks.ext.php. Your logic hook will run before saving records in any module. Module Loadable Package When building a module loadable package, you can use the $installdefs['hookdefs'] index to install the extension file. Installdef Properties Name Type Description from String The basepath of the file to be installed. to_module String The key of the module the file is to be installed to. The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Action View Map file to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the hook class file, however Sugar will automatically execute Rebuild Extensions to reflect the new logic hook in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'actionView_example', 'hookdefs' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/LogicHooks/<file>.php', 'to_module' => 'application', ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/application_hook.php', 'to' => 'custom/application_hook.php', ), ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/LogicHooks/index.html
89ada560c2b6-2
'to' => 'custom/application_hook.php', ), ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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. Alternative Installdef Although not recommended, you could utilize the $installdefs['logic_hooks'] index to deploy a logic hook to the system. Please note that there are a couple caveats to this installation method: The $installdefs['logic_hooks'] index method only works for module-based logic hooks. The $installdefs['logic_hooks'] index method installs to ./custom/modules/<module>/logic_hooks.php, which is not part of the Extension framework. Properties Name Type Description module String The key of the module for the logic hook to be installed to. hook String The type of logic hook to be installed. order Integer The number in which the logic hook should run. description String A description of the logic hook to be installed. file String The file path which contains the logic hook class. class String The class which houses the logic hook functionality. function String The function the logic hook will execute. The example below will demonstrate the $installdefs['logic_hooks'] index in the ./manifest.php file, in order to add an after save logic hook to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the hook class file. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'actionView_example',
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/LogicHooks/index.html
89ada560c2b6-3
); $installdefs = array( 'id' => 'actionView_example', 'logic_hooks' => array( array( 'module' => '<module>', 'hook' => 'after_save', 'order' => 1, 'description' => 'Example After Save LogicHook', 'file' => 'custom/modules/<module>/module_hook.php', 'class' => '<module>HookConsumer' 'function' => 'after' ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/modules/<module>/module_hook.php', 'to' => 'custom/modules/<module>/module_hook.php', ), ) ); Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/LogicHooks/index.html
710498b8817c-0
Sidecar Overview The Sidecar extension installs metadata files to their appropriate directories. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $viewdefs Extension Directory ./custom/Extension/modules/<module>/Ext/clients/<client>/<type>/<subtype>/ Compiled Extension File ./custom/<module>/Ext/clients/<client>/<type>/<subtype>/<subtype>.ext.php Manifest Installdef $installdefs['sidecar'] Implementation 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/modules/<module>/Ext/clients/<client>/<type>/<subtype>/ to append the metadata extensions. The example below demonstrates how to add a new subpanel to a specific module: ./custom/Extension/modules/<module>/Ext/clients/base/layouts/subpanels/<file>.php <?php $viewdefs['<module>']['base']['layout']['subpanels']['components'][] = array( 'layout' => 'subpanel', 'label' => 'LBL_RELATIONSHIP_TITLE', 'context' => array( 'link' => '<link_name>', ) ); Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/clients/base/layouts/subpanels/subpanels.ext.php Module Loadable Package When building a module loadable package, you can use the $installdefs['sidecar'] index to install the metadata file. Installdef Properties Name Type Description from String The base path of the file to be installed
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Sidecar/index.html
710498b8817c-1
Name Type Description from String The base path of the file to be installed Note: When adding the file to a module loadable package, its 'from' path must be formatted as clients/<client>/<type>/<subtype>/<file>.php for Sugar to recognize the installation location. to_module String The key for the module where the file will be installed If not populated, 'application' is used The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the metadata file to a specific module. When using this approach, Sugar will automatically execute Rebuild Extensions and Metadata Rebuild to reflect your changes in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array ( 'id' => 'sidecar_example', 'sidecar' => array( array( 'from' => '<basepath>/Files/custom/<module>/clients/base/layouts/subpanels/<file>.php', 'to_module' => '<module>', ), ), ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Sidecar/index.html
442b1663ea1d-0
JSGroupings Overview The JSGroupings extension allows for additional JavaScript grouping files to be created or added to existing groupings within the system. JSGroupings are file packages containing one or more minified JavaScript libraries. The groupings enhance system performance by reducing the number of JavaScript files that need to be downloaded for a given page. Some examples of JSGroupings in Sugar are sugar_sidecar.min.js, which contains the Sidecar JavaScript files, and sugar_grp1.js, which contains the base JavaScript files. You can find all of the groups listed in ./jssource/JSGroupings.php. Each group is loaded only when needed by a direct call (e.g., from a TPL file). For example, sugar_grp1.js is loaded for almost all Sugar functions, while sugar_grp_yui_widgets.js will usually be loaded for just record views. To load a JSGroupings file for a custom module, simply add a new JSGrouping and then include the JavaScript file for your custom handlebars template. You can also append to an existing grouping, such as ./include/javascript/sugar_grp7.min.js, to include the code globally. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $js_groupings Extension Directory ./custom/Extension/application/Ext/JSGroupings/ Compiled Extension File ./custom/application/Ext/JSGroupings/jsgroups.ext.php Manifest Installdef $installdefs['jsgroups']  Implementation The following sections illustrate the various ways to implement a customization to a Sugar instance. File System Creating New JSGroupings
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
442b1663ea1d-1
File System Creating New JSGroupings When working directly with the filesystem, you can create a file in ./custom/Extension/application/Ext/JSGroupings/ to add or append Javascript to JSGroupings in the system. The following example will add a new JSGrouping file to the system: ./custom/Extension/application/Ext/JSGroupings/<file>.php <?php //creates the file cache/include/javascript/newGrouping.js $js_groupings[] = $newGrouping = array( 'custom/file1.js' => 'include/javascript/newGrouping.js', 'custom/file2.js' => 'include/javascript/newGrouping.js', ); Next, create the Javascript files that will be grouped as specified in the JSGrouping definition above: ./custom/file1.js function one(){ //logic } ./custom/file2.js function two(){ //logic } Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/JSGroupings/jsgroups.ext.php. Finally, navigate to Admin > Repair > Rebuild JS Grouping Files. This will create the grouping file in the cache directory as specified: ./cache/include/javascript/newGrouping.js function one(){}/* End of File custom/file1.js */function two(){}/* End of File custom/file2.js */ Appending to Existing JSGroupings In some situations, you may find that you need to append your own JavaScript to a core Sugar JSGrouping. Similarly to creating a new JSGrouping, to append to a core JSGrouping you can create a new PHP file in ./custom/Extension/application/Ext/JSGroupings/. The example below demonstrates how to add the file ./custom/file1.js to ./cache/include/javascript/sugar_grp7.min.js.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
442b1663ea1d-2
./custom/Extension/application/Ext/JSGroupings/<file>.php <?php //Loop through the groupings to find grouping file you want to append to foreach ($js_groupings as $key => $groupings) { foreach ($groupings as $file => $target) { //if the target grouping is found if ($target == 'include/javascript/sugar_grp7.min.js') { //append the custom JavaScript file $js_groupings[$key]['custom/file1.js'] = 'include/javascript/sugar_grp7.min.js'; } break; } } Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/JSGroupings/jsgroups.ext.php. Module Loadable Package When building a module loadable package, you can use the $installdefs['jsgroups'] index to install the extension file. Installdef Properties Name Type Description from String The basepath of the file to be installed to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file to add the JSGrouping Extension file to the system. When using this approach, you still need to use the $installdefs['copy'] index for the custom JavaScript files you are adding to JSGroupings. Sugar will automatically execute Rebuild Extensions to reflect the new JSGrouping, however, you will still need to navigate to Admin > Repair > Rebuild JS Grouping Files, to create the grouping file in the cache directory. ./manifest.php <?php $manifest = array( ... ); $installdefs = array(
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
442b1663ea1d-3
$manifest = array( ... ); $installdefs = array( 'id' => 'jsGroupings_Example', 'jsgroups' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/JSGroupings/<file>.php', 'to_module' => 'application', ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/file1.js', 'to' => 'custom/file1.js' ), array( 'from' => '<basepath>/Files/custom/file2.js', 'to' => 'custom/file2.js' ) ) ); Alternatively, you may use the $installdefs['copy'] index for the JSGrouping Extension file. 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. Considerations The grouping path you specify will be created in the cache directory. If you wish to add a grouping that contains a file that is part of another group already, add a '.' after <file>.js to make the element key unique. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
baf64b63b48f-0
Include Overview The Modules extension maps additional modules in the system, typically when Module Builder deploys a module. Properties 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'] Implementation 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: ./custom/Extension/application/Ext/Include/<file>.php <?php $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)
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Include/index.html
baf64b63b48f-1
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.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'Beans_Example', 'beans' => array( array( 'module' => 'cust_Module', 'class' => 'cust_Module', 'path' => 'modules/cust_Module/cust_Module.php', 'tab' => true ) ), 'copy' => array( 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Include/index.html
226537683493-0
This page refers to content that is only available in modules running in backward compatibility mode. WirelessModuleRegistry Overview The WirelessModuleRegistry extension adds modules to the available modules for mobile. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $wireless_module_registry Extension Directory ./custom/Extension/application/Ext/WirelessModuleRegistry/ Compiled Extension File ./custom/application/Ext/WirelessModuleRegistry/wireless_module_registry.ext.php Manifest Installdef $installdefs['wireless_modules'] Implementation 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/WirelessModuleRegistry/ to add modules to the list of available modules for mobile. The following example will add a new module, 'cust_module', to the list of available modules for mobile: ./custom/Extension/application/Ext/WirelessModuleRegistry/<file>.php <?php $wireless_module_registry['cust_module'] = array( //enables/disables record creation 'disable_create' => false, ); Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/application/Ext/WirelessModuleRegistry/wireless_module_registry.ext.php. Module Loadable Package When building a module loadable package, you can use the $installdefs['wireless_modules'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed. to_module String The key of the module the file is to be installed to.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/WirelessModuleRegistry/index.html
226537683493-1
to_module String The key of the module the file is to be installed to. The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Wireless Module Registry file to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new module in the mobile application. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'wirelessModules_Example', 'wireless_modules' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/WirelessModuleRegistry/<file>.php', 'to_module' => 'application', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/WirelessModuleRegistry/index.html
626f6f5eec3c-0
Extensions Overview This extension allows for developers to create custom extensions within the framework. Custom extensions are used alongside the extensions found in ./ModuleInstaller/extensions.php. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $extensions Extension Directory ./custom/Extension/application/Ext/Extensions/ Compiled Extension File ./custom/application/Ext/Extensions/extensions.ext.php Manifest Installdef $installdefs['extensions'] Parameters section : Section name in the manifest file extdir : The directory containing the extension files file : The name of the file where extension files are compiled into module : Determines how the framework will interpret the extension (optional) <Empty> : Will enable the extension for all modules Ext : ./custom/Extension/modules/<module>/Ext/<Custom Extension>/ Ext File : ./custom/modules/<module>/Ext/<Extension Name>.ext.php <Specific Module> : Will enable the extension for the specified module Ext Directory : ./custom/Extension/modules/<Specific Module>/Ext/<Custom Extension>/ Ext File : ./custom/modules/<Specific Module>/Ext/<Extension Name>.ext.php Application : enables the extension for application only Ext Directory : ./custom/Extension/application/Ext/<Custom Extension>/ Ext File : ./custom/application/Ext/<Custom Extension>/<Extension Name>.ext.php Implementation 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/Extensions/ to map a new extension in the system. The following example will create a new extension called "example", which is only enabled for "application": ./custom/Extension/application/Ext/Extensions/<file>.php <?php
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Extension/index.html
626f6f5eec3c-1
./custom/Extension/application/Ext/Extensions/<file>.php <?php $extensions['example'] = array( 'section' => 'example', 'extdir' => 'Example', 'file' => 'example.ext.php', 'module' => 'application' //optional paramater ); Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will rebuild the extensions and compile your customization into ./custom/application/Ext/Extensions/extensions.ext.php. Then you will be able to add your own extension files in  ./custom/Extension/application/Ext/Example/. Module Loadable Package When building a module loadable package, you can use the $installdefs['extensions'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed The example below will demonstrate the proper install definition that should be used in the ./manifest.php file in order to add the Extension file to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new Extension in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'customExtension_Example', 'extensions' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/Extensions/<file>.php' ) ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Extension/index.html
626f6f5eec3c-2
) ) ); Alternatively, you may use the $installdefs['copy'] index for the Extension file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Extension/index.html
6525ee727055-0
UserPage Overview The UserPage extension adds sections to the User Management view. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module: Users Extension Directory ./custom/Extension/modules/Users/Ext/UserPage/ Compiled Extension File ./custom/Users/Ext/UserPage/userpage.ext.php Manifest Installdef $installdefs['user_page'] Implementation 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/modules/Users/Ext/UserPage/ to add custom elements to the User page. The following example will add a custom table to the Users module's detail view: ./custom/Extension/modules/Users/Ext/UserPage/<file>.php <?php $HTML=<<<HTML <table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view"> <tbody> <tr height="20"> <th scope="col" width="15%"> <slot>Header</slot> </th> </tr> <tr height="20" class="oddListRowS1"> <td scope="row" valign="top"> Content </td> </tr> </tbody> </table> HTML; echo $HTML; Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/Users/Ext/UserPage/userpage.ext.php Module Loadable Package When building a module loadable package, you can use the $installdefs['user_page'] index to install the extension file. Installdef Properties Name Type Description
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/UserPage/index.html
6525ee727055-1
Installdef Properties Name Type Description from String The base path of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the UserPage file to the system. When using this approach, Sugar will automatically execute Rebuild Extensions to reflect the changes to the User view in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'userPage_Example', 'user_page' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/Users/Ext/UserPage/<file>.php', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/UserPage/index.html
9c4b668082b0-0
Vardefs Overview The Vardefs extension adds or overrides system vardefs, which provide the Sugar application with information about SugarBeans. For more information on vardefs in Sugar, please refer to the Vardefs documentation . Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $dictionary Extension Directory ./custom/Extension/modules/<module>/Ext/Vardefs/ Compiled Extension File ./custom/<module>/Ext/Vardefs/vardefs.ext.php Manifest Installdef $installdefs['vardefs'] Implementation 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/modules/<module>/Ext/Vardefs/ to edit or add vardefs to a module in the system. The most common use of the Vardef extension is to alter the attributes of an existing vardef. To do this,avoid redefining the entire vardef and instead update the specific index you want to change. The following example updates the Required property on the Name field in a module: ./custom/Extension/modules/<module>/Ext/Vardefs/<file>.php $dictionary['<module>']['fields']['name']['required'] = false; Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and your customizations will be compiled into ./custom/modules/<module>/Ext/Vardefs/vardefs.ext.php . Notice  Never specify vardefs for a module under another module's extension path. For example, do not specify $dictionary['Accounts']['fields']['name']['required'] = false under ./custom/Extension/modules/Contacts/Ext/Vardefs/. Doing so will result in unexpected behavior within the system. Module Loadable Package
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Vardefs/index.html
9c4b668082b0-1
Module Loadable Package When building a module loadable package, you can use the $installdefs['vardefs'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Vardefs file to a specific module. You should note that when using this approach Sugar will automatically execute Rebuild Extensions to reflect the vardef changes in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'vardefs_Example', 'vardefs' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/Vardefs/<file>.php', 'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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. Creating Custom Fields If your goal is to manually create a custom field on an instance, you should be using the Module Installer to create the field. This can be used both for an installer package and programmatically. An example of creating a field from a module loadable package can be found under Package Examples in the article, Creating an Installable Package that Creates New Fields. An example of programmatically creating a field can be found in the Manually Creating Custom Fields section of the Module Vardefs documentation.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Vardefs/index.html
9c4b668082b0-2
Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Vardefs/index.html
1950f71917b3-0
ScheduledTasks Overview The ScheduledTasks extension adds custom functions that can be used by scheduler jobs. For more information about schedulers in Sugar, please refer to the Schedulers documentation. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module: Schedulers Sugar Variable $job_strings Extension Directory ./custom/Extension/modules/Schedulers/Ext/ScheduledTasks/ Compiled Extension File ./custom/Schedulers/Ext/ScheduledTasks/scheduledtasks.ext.php Manifest Installdef $installdefs['scheduledefs'] Implementation 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/modules/Schedulers/Ext/ScheduledTasks/ to add a new Scheduler Task to the system. The following example will create a new Scheduler Task 'example_job': ./custom/Extension/modules/Schedulers/Ext/ScheduledTasks/<file>.php <?php $job_strings[] = 'exampleJob'; function exampleJob() { //logic here //return true for completed return true; } Next, create the Language file for the scheduler so that the job properly displays in Admin > Schedulers: ./custom/Extension/modules/Schedulers/Ext/Language/<language>.<file>.php <?php //Label will be LBL_[upper case function name] $mod_strings['LBL_EXAMPLEJOB'] = 'Example Job'; Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and the customizations will be compiled into ./custom/modules/Schedulers/Ext/ScheduledTasks/scheduledtasks.ext.php Module Loadable Package
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ScheduledTasks/index.html
1950f71917b3-1
Module Loadable Package When building a module loadable package, you can use the $installdefs['scheduledefs'] index to install the extension file. Installdef Properties Name Type Description from String The basepath of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the custom Scheduler definition file to the system. When using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new Scheduler in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'actionView_example', 'scheduledefs' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/Scheduler/Ext/ScheduledTasks/<file>.php', ) ), 'language' => array( array( 'from' =>'<basepath>/Files/custom/Extension/modules/Schedulers/Ext/Language/<file>.php', 'to_module' => 'Schedulers', 'language' => 'en_us' ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ScheduledTasks/index.html
10310a56fe2c-0
Dependencies Overview Dependencies create dependent actions for fields and forms that can leverage more complicated logic. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $dependencies Extension Directory ./custom/Extension/modules/<module>/Ext/Dependencies/ Compiled Extension File ./custom/modules/<module>/Ext/Dependencies/deps.ext.php Manifest Installdef $installdefs['dependencies'] Implementation 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/modules/<module>/Ext/Dependencies/<file>.php to map a new dependency in the system. The following example will create a new required field dependency on a module that is evaluated upon editing a record: ./custom/Extension/modules/<module>/Ext/Dependencies/<file>.php <?php $dependencies['<module>']['<unique name>'] = array( 'hooks' => array("edit"), //Trigger formula for the dependency. Defaults to 'true'. 'trigger' => 'true', 'triggerFields' => array('<trigger field>'), 'onload' => true, //Actions is a list of actions to fire when the trigger is true 'actions' => array( array( 'name' => 'SetRequired', //Action type //The parameters passed in depend on the action type 'params' => array( 'target' => '<field>', 'label' => '<field label>', //normally <field>_label 'value' => 'equal($<trigger field>, "Closed")', //Formula ), ), ), );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Dependencies/index.html
10310a56fe2c-1
), ), ), ); Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions, compiling your customization into./custom/modules/<module>/Ext/Dependencies/deps.ext.php, and the dependency will be in place. Module Loadable Package When building a module loadable package, you can use the $installdefs['dependencies'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Dependency file to a specific module. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new Dependency in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'dependency_example', 'dependencies' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/Dependencies/<file>.php', 'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index for the Dependency Extension file. When using this approach, you may need to manually run a repair action 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Dependencies/index.html
00cb7fd0fcfc-0
This page refers to content that is only available in modules running in backward compatibility mode. ActionViewMap Overview The ActionViewMap extension maps additional actions for a module. Note: Actions that apply to modules running in backward compatibility mode are mapped in ./custom/modules/<module>/controller.php. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $action_view_map Extension Directory ./custom/Extension/modules/<module>/Ext/ActionViewMap/ Compiled Extension File ./custom/<module>/Ext/ActionViewMap/action_view_map.ext.php Manifest Installdef $installdefs['action_view_map'] Implementation 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/modules/<module>/Ext/ActionViewMap/ to map a new view in the system. The following example will map a new action called 'example' to the 'example' view: ./custom/Extension/modules/<module>/Ext/ActionViewMap/<file>.php <?php $action_view_map['example'] = 'example'; ./custom/modules/<module>/views/view.example.php <?php if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); require_once('include/MVC/View/views/view.detail.php'); class <module>ViewExample extends ViewDetail { function <module>ViewExample() { parent::ViewDetail(); } function display() { echo 'Example View'; } } ?>
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html
00cb7fd0fcfc-1
{ echo 'Example View'; } } ?> Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/ActionViewMap/action_view_map.ext.php. Module Loadable Package When building a module-loadable package, use the $installdefs['action_view_map'] index to install the extension file. Installdef Properties Name Type Description from String The basepath of the file to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition for the ./manifest.php file in order to add the Action View Map file to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the View file, however, Sugar will automatically execute Rebuild Extensions to reflect the new Action View in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'actionView_example', 'action_view_map' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/ActionViewMap/<file>.php', 'to_module' => '<module>', ) ), 'copy' => array( array( 'from' => '<basepath>/Files/custom/modules/<module>/views/view.example.php', 'to' => 'custom/modules/<module>/views/view.example.php', ), ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html
00cb7fd0fcfc-2
), ) ); Alternatively, you may use the $installdefs['copy'] index for the Action View Map Extension file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on module-loadable packages, please refer to the Introduction to the Manifest page . Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html
7789ee94fa4a-0
Application Schedulers Overview Application Scheduler extensions add custom functions that can be used by scheduler jobs. Note: This Extension is a duplicate of the ScheduledTasks extension, which typically places Scheduled Tasks in the Schedulers directory. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Sugar Variable $job_strings Extension Directory ./custom/Extension/application/Ext/ScheduledTasks/ Compiled Extension File ./custom/application/Ext/ScheduledTasks/scheduledtasks.ext.php Manifest Installdef $installdefs['appscheduledefs'] Implementation The following sections illustrates 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/ScheduledTasks/ to add a new Scheduler Task to the system. The following example will create a new Scheduler Task 'example_job': ./custom/Extension/application/Ext/ScheduledTasks/<file>.php <?php $job_strings[] = 'exampleJob'; function exampleJob() { //logic here //return true for completed return true; } Next create the Language file for the Scheduler, so that the Job properly displays in Admin > Schedulers section: ./custom/Extension/modules/Schedulers/Ext/Language/<language>.<file>.php <?php //Label will be LBL_[upper case function name] $mod_strings['LBL_EXAMPLEJOB'] = 'Example Job'; Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and the customizations will be compiled into ./custom/application/Ext/ScheduledTasks/scheduledtasks.ext.php Module Loadable Package
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Application_Schedulers/index.html
7789ee94fa4a-1
Module Loadable Package When building a module loadable package, you can use the $installdefs['appscheduledefs'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed. The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the custom Scheduler definition file to the system. You should note that, when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new scheduler in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'appScheduledTasks_example', 'appscheduledefs' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/ScheduledTasks/<file>.php', ) ), 'language' => array( array( 'from' =>'<basepath>/Files/custom/Extension/modules/Schedulers/Ext/Language/<file>.php', 'to_module' => 'Schedulers', 'language' => 'en_us' ) ) ); Alternatively, you may use the $installdefs['copy'] index for the Scheduled Task Extension file. When using this approach, you may need to manually run a repair action such as a Quick Repair and Rebuild. For more information about the $installdefs['copy'] index and module-loadable packages, please refer to the Introduction to the Manifest page. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Application_Schedulers/index.html
a5a86354da8d-0
This page refers to content that is only available in modules running in backward compatibility mode. ActionReMap Overview The ActionReMap extension maps new actions to existing actions. This extension is only applicable to modules running in backward compatibility mode. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $action_remap Extension Directory ./custom/Extension/modules/<module>/Ext/ActionReMap/ Compiled Extension File ./custom/<module>/Ext/ActionReMap/action_remap.ext.php Manifest Installdef $installdefs['action_remap'] Implementation The following sections illustrate the various ways to implement a customization to a Sugar instance. File System When working directly with the file system, you can create a file in  ./custom/Extension/modules/<module>/Ext/ActionReMap/ to map an action to another defined action. The following example will map the action 'example' to 'detailview': ./custom/Extension/modules/<module>/Ext/ActionReMap/<file>.php <?php $action_remap['example'] = 'detailview'; Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/ActionReMap/action_remap.ext.php. Module Loadable Package When building a module loadable package, you can use the $installdefs['action_remap'] index to install the extension file.  Installdef Properties Name Type Description from String The basepath of the file to be installed to_module String The key for the module where the file will be installed
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionReMap/index.html
a5a86354da8d-1
to_module String The key for the module where the file will be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Action Remap file to a specific module. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect your changes in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'ActionRemap_Example', 'action_remap' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/ActionReMap/<file>.php', 'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionReMap/index.html
1211901a17af-0
Platforms Overview The Platforms extension adds allowed REST API platforms when restricting custom platforms through the use of the disable_unknown_platforms configuration setting. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Application Extension Directory ./custom/Extension/application/Ext/Platforms/ Compiled Extension File ./custom/application/Ext/Platforms/platforms.ext.php Manifest Installdef $installdefs['platforms'] Implementation The following sections illustrate the various ways to implement a new platform type to a Sugar instance. File System When working directly with the filesystem, enable the disable_unknown_platforms configuration by setting $sugar_config['disable_unknown_platforms'] = true in your ./config_override.php. This will prevent the system from allowing unknown platform types from accessing the rest endpoints. Next, create a file in ./custom/Extension/application/Ext/Platforms/ to map a new platform in the system. The following example adds a new platform called 'integration' that can be used throughout the system: ./custom/Extension/application/Ext/Platforms/<file>.php <?php $platforms[] = 'integration'; Finally, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and your customizations will be compiled into ./custom/application/Ext/Platforms/platforms.ext.php. Alternatively, platforms can also be added by creating ./custom/clients/platforms.php and appending new platform types to the $platforms variable. This method of creating platforms is still compatible but is not recommended from a best practices standpoint.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html
1211901a17af-1
Once installed, developers can take advantage of the new platform type when authenticating with the REST API oauth2/token endpoint. An example is shown below:  { "grant_type": "password", "username": "admin", "password": "password", "client_id": "sugar", "client_secret": "", "platform": "integration" } Module Loadable Package When building a module loadable package, you can use the $installdefs['platforms'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the utils to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new utils in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'Platforms_Example', 'platforms' => array( array( 'from' => '<basepath>/Files/custom/Extension/application/Ext/Platforms/<file>.php', ) ) ); Alternatively, you may use the $installdefs['copy'] index to copy the file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html
a7af75e6fb52-0
This page refers to content that is only available in modules running in backward compatibility mode. FileAccessControlMap Overview The FileAccessControlMap extension restricts specific view actions from users of the system. Note: This is only applicable to modules running in backward compatibility mode. Properties The following extension properties are available. For more information, please refer to the Extension Property documentation. Property Value Extension Scope Module Sugar Variable $file_access_control_map Extension Directory ./custom/Extension/modules/<module>/Ext/FileAccessControlMap/ Compiled Extension File ./custom/modules/<module>/Ext/FileAccessControlMap/file_access_control_map.ext.php Manifest Installdef $installdefs['file_access'] Implementation 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/modules/<module>/Ext/FileAccessControlMap/ to restrict a view of a module. The following example will create a new restriction for the detail view: ./custom/Extension/modules/<module>/Ext/FileAccessControlMap/<file>.php <?php $file_access_control_map['modules']['<lowercase module>']['actions'] = array( 'detailview', ); Navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/FileAccessControlMap/file_access_control_map.ext.php Module Loadable Package When building a module loadable package, you can use the $installdefs['file_access'] index to install the extension file. Installdef Properties Name Type Description from String The base path of the file to be installed to_module String The key of the module the file is to be installed to
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/FileAccessControlMap/index.html
a7af75e6fb52-1
to_module String The key of the module the file is to be installed to The example below demonstrates the proper install definition that should be used in the ./manifest.php file, in order to add the File Access Control Map file to a specific module. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new Action in the system. ./manifest.php <?php $manifest = array( ... ); $installdefs = array( 'id' => 'ActionRemap_Example', 'file_access' => array( array( 'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/FileAccessControlMap/<file>.php', 'to_module' => '<module>', ) ) ); Alternatively, you may use the $installdefs['copy'] index for the File Access Control Map Extension file. 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: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/FileAccessControlMap/index.html
2b85f83e0869-0
Themes Overview How to customize the Sugar theme.  Theme Variables Sugar's theme variables, defined in ./styleguide/themes/clients/base/default/variables.php, determine the color of the primary action buttons, links, and header navigation. An example of the definition is shown below: ./styleguide/themes/clients/base/default/variables.php $lessdefs = array( 'colors' => array( /** * Secondary Color: * color of the navbar * ------------------------- * was @secondary */ 'NavigationBar' => '#fff', /** * Primary Button Color: * color of the primary button * ------------------------- * was @primaryBtn */ 'PrimaryButton' => '#0679c8', ), ); Variable Descriptions It is important to understand what the purpuse and utility of each variable is before you apply in your code, below is an in-depth description: @NavigationBar Used to customize the mega menu background colour  Defaults to Sugar's @white (#ffffff)  Note: This variable is only supported in light mode @PrimaryButton Used to customize the background colour for primary buttons (elements using `btn btn-primary`)  Defaults to Sugar's @blue (#0679c8)  @LinkColor   Used to customize the text color of link (anchor) elements  Defaults to Sugar's @blue (#0679c8)  Note: This variable is only supported in light mode Custom Themes
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-1
Note: This variable is only supported in light mode Custom Themes Modifications to the theme can be made by creating ./custom/themes/clients/base/default/variables.php. Within this file, you can define the custom hex codes for the colors you would like to use. You should note that this is limited to the @NavigationBar, and @PrimaryButton less variables. An example is shown below.  ./custom/themes/clients/base/default/variables.php Note: Developers cannot override existing bootstrap less variables using this file. Adding CSS Sugar allows you to customize CSS using the less language in ./custom/themes/custom.less. As Sugar makes use of the Bootstrap library, you have access to the features of Bootstrap and can make use of its variables to create your own CSS. An example is shown below.  ./custom/themes/custom.less //You can import any less file you want and define your own file structure //@import 'anyotherfile.less @myCustomBgColor: lighten(@NavigationBar,10%); //variable defined on a custom variable. .myCustomClass { color: @linkColor; //bootstrap variable background-color: @myCustomBgColor; } Overriding CSS Definitions You can use the ./custom/themes/custom.less file to override CSS classes. The following example overrides the record label font size. ./custom/themes/custom.less /* * Changes record field label sizes to 13px; */ .record-cell .record-label{ font-size:13px; } Overriding the MegaMenu
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-2
font-size:13px; } Overriding the MegaMenu As the MegaMenu has limited color customization within ./custom/themes/clients/base/default/variables.php, you may want to customize the look and feel further. The following example will automatically set the menu's link color to a contrasting color based on the @NavigationBar variable and determine the hover and active colors for the tabs.   ./custom/themes/custom.less // Workaround for luminance calculation // Use luma() function once Sugar upgraded Lessphp to 1.7+ (see: http://lesscss.org/functions/#color-channel-luminance) @luma: 1 - ( (0.299 * red(@NavigationBar)) + (0.587 * green(@NavigationBar)) + (0.114 * blue(@NavigationBar)))/255; /** * LESS GUARDS */ // General Nav Colors .mixin-color() { // Darker Colors & when (@luma > 0.5) { color: darken(contrast(@NavigationBar), 10%) !important; } // Bright Colors & when (@luma <= 0.5) { color: lighten(contrast(@NavigationBar), 10%) !important; // color: darken(@NavigationBar, 30%) !important; } } // Nav Fa Icon Colors .mixin-fa-color(){ // Darker Colors & when (@luma > 0.5) { color: darken(contrast(@NavigationBar), 10%) !important; } // Bright Colors & when (@luma <= 0.5) { // color: lighten(@NavigationBar, 30%); color: lighten(contrast(@NavigationBar), 10%) !important;
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-3
color: lighten(contrast(@NavigationBar), 10%) !important; // color: darken(@NavigationBar, 30%) !important; } } // Hover Button Groups Background colors .mixin-background-color-hover(){ // Dark Colors & when (@luma > 0.5) { background-color: lighten(@NavigationBar, 15%) !important; } // Bright Colors & when (@luma <= 0.5) { background-color: darken(@NavigationBar, 15%) !important; } } // Hover Button Groups colors .mixin-color-hover(){ // Dark Colors & when (@luma > 0.5) { color: darken(contrast(@NavigationBar), 10%) !important; } // Bright Colors & when (@luma <= 0.5) { // color: lighten(@NavigationBar, 20%) !important; color: lighten(contrast(@NavigationBar), 10%) !important; } } // Active Button Group Background Colors .mixin-background-color-active(){ // Dark Colors & when (@luma > 0.5) { background-color: lighten(@NavigationBar, 10%) !important; } // Bright Colors & when (@luma <= 0.5) { background-color: darken(@NavigationBar, 10%) !important; } } // Active Button Group Hover Colors .mixin-color-active-hover(){ // Dark Colors & when (@luma > 0.5) { color: darken(contrast(@NavigationBar), 5%) !important; } // Bright Colors & when (@luma <= 0.5) {
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-4
// Bright Colors & when (@luma <= 0.5) { color: lighten(contrast(@NavigationBar), 5%) !important; } } // Open Button Group Background Colors .mixin-background-color-open(){ // Dark Colors & when (@luma > 0.5) { background-color: lighten(@NavigationBar, 20%) !important; } // Bright Colors & when (@luma <= 0.5) { background-color: darken(@NavigationBar, 20%) !important; } } // Open Button Group Hover Colors .mixin-color-open-hover(){ // Dark Colors & when (@luma > 0.5) { color: darken(contrast(@NavigationBar), 15%) !important; } // Bright Colors & when (@luma <= 0.5) { color: lighten(contrast(@NavigationBar), 15%) !important; } } // Background/Foreground Dropdown Menu Hover .mixin-background-foreground-dropdown-menu-hover(){ // Dark Colors & when (@luma > 0.5) { background-color: lighten(@NavigationBar, 15%) !important; color: darken(contrast(@NavigationBar), 15%) !important; .fa { color: darken(contrast(@NavigationBar), 15%) !important; } } // Bright Colors & when (@luma <= 0.5) { background-color: @NavigationBar !important; color: lighten(contrast(@NavigationBar), 5%) !important; .fa { color: lighten(contrast(@NavigationBar), 5%) !important; } } } /** * LESS Definitions */
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-5
} } } /** * LESS Definitions */ // Nav Button Group .module-list .megamenu > .dropdown .module-name{ .mixin-color; } // Home Button Caret .navbar .megamenu > .dropdown.active .btn-group:not(.open).home .fa-caret-down, // More Button Caret .module-list .megamenu > .dropdown.more .fa, // Module Toggle caret .navbar .megamenu > .dropdown .btn-group > .dropdown-toggle .fa { .mixin-fa-color; } // Nav Button Group Hover .megamenu .dropdown .btn-group{ &:hover, &:focus{ .mixin-background-color-hover; .btn, > .dropdown-toggle .fa{ .mixin-color-hover; } } } // Active Button Group .navbar .megamenu > .dropdown.active .btn-group{ .mixin-background-color-active; > .dropdown-toggle .fa, > a.btn{ .mixin-fa-color; } } // Active Button Group Hover .navbar .megamenu > .dropdown.active .btn-group:hover{ .mixin-color-active-hover; > .dropdown-toggle .fa, > a.btn{ .mixin-color-active-hover; } } // Open Nav Button Group .navbar .megamenu > .dropdown .btn-group.open{ .mixin-background-color-open; > .dropdown-toggle .fa, > a.btn{ .mixin-fa-color; } } // Open Nav Button Group Hover .navbar .megamenu > .dropdown .btn-group.open:hover{
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
2b85f83e0869-6
.navbar .megamenu > .dropdown .btn-group.open:hover{ .mixin-color-open-hover; > .dropdown-toggle .fa, > a.btn{ .mixin-color-open-hover; } } // Nav Button Group Dropdown Menu .navbar .megamenu > .dropdown .dropdown-menu li a{ &:hover, &:focus{ .mixin-background-foreground-dropdown-menu-hover; } } Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Themes/index.html
0160c62e6b45-0
Quotes Overview As of Sugar 7.9.0.0, the quotes module has been moved out of Backward Compatibility mode into Sidecar. Customizations to the Quotes interface will need to be rewritten for the new Sidecar framework as an automated migration of these customizations is not possible. This document will outline common customizations and implementation methods. Quote Identifiers Administrators can create custom quote identifiers that are more complex than the default auto-incrementing scheme found in an out of box installation. Utilizing this functionality, we can create numbering schemes that match any business needs. Creating Custom Identifiers To create a custom identifier, navigate to Admin > Studio > Quotes > Fields. Next, create a TextField type field named to your liking and check the "Calculated Value" checkbox and click "Edit Formula". Once you see the formula builder, you can choose an example below or create your own. Once created, You can add the new field to your Quote module's layouts as desired. User Field with Pseudo-Random Values This example creates a quote number in the format of <user last name>-##### that translates to Smith-87837. This identifier starts with the last name of the user creating it, followed by 5 pseudo-random numbers based on the creation time. concat(related($created_by_link, "last_name"), "-", subStr(toString(timestamp($date_entered)), 5, 5)) Note: when using Sugar Logic, updates to related fields will update any corresponding Sugar Logic fields. The example being that an update to the Created By last name field will update all related records with a field using this formula. Related Field Value and Auto-Incrementing Number
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-1
Related Field Value and Auto-Incrementing Number This example creates a quote number in the format of <billing account name>-#### that translates to Start Over Trust-0001. This number starts with the billing account name followed by a 4 digit auto-incrementing number. concat(related($billing_accounts, "name"), "-", subStr(toString(add($quote_num, 10000)), 1, 4)) Note: when using Sugar Logic, updates to related fields will update any corresponding Sugar Logic fields. The example being that an update to the Billing Account name will update all related records with a field using this formula. Record Layout The following sections outline various changes that can be done to modify the record layout of the Quotes module, by outlining the extra views that can be updated. Grand Totals Header The Grand Total Header contains the calculated totals for the quote. Modifying Fields in the Grand Totals Header To modify the Grand Totals Header fields, you can copy ./modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php to ./custom/modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php or you may create a metadata extension in ./custom/Extension/modules/Quotes/clients/base/views/quote-data-grand-totals-header/. Next, modify the $viewdefs['Quotes']['base']['view']['quote-data-grand-totals-header']['panels'][0]['fields'] index to add or remove your preferred fields. Example
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-2
Example The example below will add the "Quote Number" field (quotes.quote_num) field to the layout and removes the "Total Discount" (quotes.deal_tot) from the layout. If adding a custom field from the Quotes module to the view, you will also need to add that field to the related_fields array as outlined in the Record View documentation below. ./custom/modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php <?php $viewdefs['Quotes']['base']['view']['quote-data-grand-totals-header'] = array( ... 'panels' => array( array( 'name' => 'panel_quote_data_grand_totals_header', 'label' => 'LBL_QUOTE_DATA_GRAND_TOTALS_HEADER', 'fields' => array( array( 'name' => 'quote_num', 'label' => 'LBL_LIST_QUOTE_NUM', 'css_class' => 'quote-totals-row-item', ), array( 'name' => 'new_sub', 'css_class' => 'quote-totals-row-item', ), array( 'name' => 'tax', 'label' => 'LBL_TAX_TOTAL', 'css_class' => 'quote-totals-row-item', ), array( 'name' => 'shipping', 'css_class' => 'quote-totals-row-item', ), array( 'name' => 'total', 'label' => 'LBL_LIST_GRAND_TOTAL', 'css_class' => 'quote-totals-row-item', ), ), ), ), );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-3
), ), ), ), ); Modifying Buttons in the Grand Totals Header The Quotes List Header contains row actions to create quoted line items, comments, and groupings. The actions are identified by the plus icon in the top left of the header. Editing the 'actions' will allow you to add or remove buttons. The following section will outline how these items can be modified. To modify the Row Actions in the Grand Total Header, you can copy ./modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php to ./custom/modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php or you may create a metadata extension in ./custom/Extension/modules/Quotes/clients/base/views/quote-data-grand-totals-header/. Next, modify the $viewdefs['Quotes']['base']['view']['quote-data-grand-totals-header']['buttons'] index to add or remove your preferred row actions. Example The example below will create a new view that extends the QuotesQuoteDataGrandTotalsHeader view and append a button to the Grand Total Header button list. First, create your custom view type that will extend the QuotesQuoteDataGrandTotalsHeader view. ./custom/modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.js ({ extendsFrom: 'QuotesQuoteDataGrandTotalsHeaderView', initialize: function(options) { this.events = _.extend({}, this.events, options.def.events, { 'click [name="gth-custom-button"]': 'buttonClicked' }); this._super('initialize', [options]); }, /** * Click event */ buttonClicked: function() { app.alert.show('success_alert', {
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-4
buttonClicked: function() { app.alert.show('success_alert', { level: 'success', title: 'Grand Total Header Button was clicked!' }); }, }) This code will append a click event to our button named gth-custom-button and trigger the buttonClicked method. Once completed, add your new button array to the grand total header in the $viewdefs['Quotes']['base']['view']['quote-data-grand-totals-header']['buttons'] index. ./custom/modules/Quotes/clients/base/views/quote-data-grand-totals-header/quote-data-grand-totals-header.php <?php $viewdefs['Quotes']['base']['view']['quote-data-grand-totals-header'] = array( 'buttons' => array( array( 'type' => 'quote-data-actiondropdown', 'name' => 'panel_dropdown', 'no_default_action' => true, 'buttons' => array( array( 'type' => 'button', 'icon' => 'fa-plus', 'name' => 'create_qli_button', 'label' => 'LBL_CREATE_QLI_BUTTON_LABEL', 'acl_action' => 'create', 'tooltip' => 'LBL_CREATE_QLI_BUTTON_TOOLTIP', ), array( 'type' => 'button', 'icon' => 'fa-plus', 'name' => 'create_comment_button', 'label' => 'LBL_CREATE_COMMENT_BUTTON_LABEL', 'acl_action' => 'create', 'tooltip' => 'LBL_CREATE_COMMENT_BUTTON_TOOLTIP', ), array( 'type' => 'button', 'icon' => 'fa-plus', 'name' => 'create_group_button',
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-5
'name' => 'create_group_button', 'label' => 'LBL_CREATE_GROUP_BUTTON_LABEL', 'acl_action' => 'create', 'tooltip' => 'LBL_CREATE_GROUP_BUTTON_TOOLTIP', ), array( 'type' => 'button', 'icon' => 'fa-plus', 'name' => 'gth-custom-button', 'label' => 'LBL_GTH_CUSTOM_BUTTON', 'acl_action' => 'create', 'tooltip' => 'LBL_GTH_CUSTOM_BUTTON_TOOLTIP', ), ), ), ), ... ); Finally, create labels under Quotes for the label and tooltip indexes. To accomplish this, create a language extension: ./custom/Extension/modules/Quotes/Ext/Language/en_us.custom-button.php <?php $mod_strings['LBL_GTH_CUSTOM_BUTTON'] = 'Custom Button'; $mod_strings['LBL_GTH_CUSTOM_BUTTON_TOOLTIP'] = 'Custom Button Tooltip'; Once the files are in place, navigate to Admin > Repair > Quick Repair and Rebuild. Your changes will now be reflected in the system. List Header The Quotes List Header is a complex view that pulls data from two different locations. The JavaScript controller is located in ./modules/Quotes/clients/base/views/quote-data-list-header/quote-data-list-header.js and pulls the metadata from ./modules/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php. You should note that ProductBundleNotes combines its description field with Product fields in this list. Modifying Fields in the List Header
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-6
Modifying Fields in the List Header To modify the List Header fields, you can copy ./modules/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php to ./custom/modules/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php or you may create a metadata extension in ./custom/Extension/modules/Products/Ext/clients/base/views/quote-data-group-list/. Next, modify the $viewdefs['Products']['base']['view']['quote-data-group-list']['panels'][0]['fields'] index to add or remove your preferred fields. Example The example below will remove the "Part Number" (products.mft_part_num) field and replace it with the "Weight" (products.weight) field. ./custom/modules/Products/clients/base/views/quote-data-group-list/quote-data-group-list.php <?php $viewdefs['Products']['base']['view']['quote-data-group-list'] = array( 'panels' => array( array( 'name' => 'products_quote_data_group_list', 'label' => 'LBL_PRODUCTS_QUOTE_DATA_LIST', 'fields' => array( array( 'name' => 'line_num', 'label' => null, 'widthClass' => 'cell-xsmall', 'css_class' => 'line_num tcenter', 'type' => 'line-num', 'readonly' => true, ), array( 'name' => 'quantity', 'label' => 'LBL_QUANTITY', 'widthClass' => 'cell-small', 'css_class' => 'quantity', 'type' => 'float', ), array( 'name' => 'product_template_name', 'label' => 'LBL_ITEM_NAME',
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-7
'label' => 'LBL_ITEM_NAME', 'widthClass' => 'cell-large', 'type' => 'quote-data-relate', 'required' => true, ), array( 'name' => 'weight', 'label' => 'LBL_WEIGHT', 'type' => 'float', ), array( 'name' => 'discount_price', 'label' => 'LBL_DISCOUNT_PRICE', 'type' => 'currency', 'convertToBase' => true, 'showTransactionalAmount' => true, 'related_fields' => array( 'discount_price', 'currency_id', 'base_rate', ), ), array( 'name' => 'discount', 'type' => 'fieldset', 'css_class' => 'quote-discount-percent', 'label' => 'LBL_DISCOUNT_AMOUNT', 'fields' => array( array( 'name' => 'discount_amount', 'label' => 'LBL_DISCOUNT_AMOUNT', 'type' => 'discount', 'convertToBase' => true, 'showTransactionalAmount' => true, ), array( 'type' => 'discount-select', 'name' => 'discount_select', 'no_default_action' => true, 'buttons' => array( array( 'type' => 'rowaction', 'name' => 'select_discount_amount_button', 'label' => 'LBL_DISCOUNT_AMOUNT', 'event' => 'button:discount_select_change:click', ), array( 'type' => 'rowaction',
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-8
), array( 'type' => 'rowaction', 'name' => 'select_discount_percent_button', 'label' => 'LBL_DISCOUNT_PERCENT', 'event' => 'button:discount_select_change:click', ), ), ), ), ), array( 'name' => 'total_amount', 'label' => 'LBL_LINE_ITEM_TOTAL', 'type' => 'currency', 'widthClass' => 'cell-medium', 'showTransactionalAmount' => true, 'related_fields' => array( 'total_amount', 'currency_id', 'base_rate', ), ), ), ), ), ); Next, create the LBL_WEIGHT label under Quotes as this is not included in the stock installation. To accomplish this, we will need to create a language extension: ./custom/Extension/modules/Quotes/Ext/Language/en_us.weight.php <?php $mod_strings['LBL_WEIGHT'] = 'Weight'; If adding a custom field from the Quotes module to the view, you will also need to add that field to the related_fields array as outlined in the Record View documentation below. Once the files are in place, navigate to Admin > Repair > Quick Repair and Rebuild. Your changes will now be reflected in the system. Modifying Row Actions in the List Header The Quotes List Header contains row actions to create and delete QLI groupings. The actions are identified by, the "check all" checkbox and vertical ellipsis or "hamburger" icon buttons. Editing the 'actions' will allow you to add more buttons to (or remove from) the "Group Selected" and "Delete Selected" buttons. The following section will outline how these items can be modified.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-9
To modify the Row Actions in the List Header, you can copy ./modules/Quotes/clients/base/views/quote-data-list-header/quote-data-list-header.php to ./custom/modules/Quotes/clients/base/views/quote-data-list-header/quote-data-list-header.php or you may create a metadata extension in ./custom/Extension/modules/Quotes/clients/base/views/quote-data-list-header/. Next, modify the $viewdefs['Quotes']['base']['view']['quote-data-list-header']['selection']['actions'] index to add or remove your preferred actions. Example The example below will create a new view that extends the QuotesQuoteDataListHeader view and append a row action to the List Header action list. First, create your custom view type that will extend the QuotesQuoteDataListHeader view. ./custom/modules/Quotes/clients/base/views/quote-data-list-header/quote-data-list-header.js ({ extendsFrom: 'QuotesQuoteDataListHeaderView', initialize: function(options) { this.events = _.extend({}, this.events, options.def.events, { 'click [name="lh-custom-button"]': 'actionClicked' }); this._super('initialize', [options]); }, /** * Click event */ actionClicked: function() { app.alert.show('success_alert', { level: 'success', title: 'List Header Row Action was clicked!' }); }, }) This code will append a click event to our field named lh-custom-button and trigger the actionClicked method. Once completed, add your new row action to the list header in the $viewdefs['Quotes']['base']['view']['quote-data-list-header']['selection']['actions'] index. ./custom/modules/Quotes/clients/base/views/quote-data-list-header/quote-data-list-header.php <?php
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-10
<?php $viewdefs['Quotes']['base']['view']['quote-data-list-header'] = array( 'selection' => array( 'type' => 'multi', 'actions' => array( array( 'name' => 'group_button', 'type' => 'rowaction', 'label' => 'LBL_CREATE_GROUP_SELECTED_BUTTON_LABEL', 'tooltip' => 'LBL_CREATE_GROUP_SELECTED_BUTTON_TOOLTIP', 'acl_action' => 'edit', ), array( 'name' => 'massdelete_button', 'type' => 'rowaction', 'label' => 'LBL_DELETE_SELECTED_LABEL', 'tooltip' => 'LBL_DELETE_SELECTED_TOOLTIP', 'acl_action' => 'delete', ), array( 'name' => 'lh-custom-button', 'type' => 'rowaction', 'label' => 'LBL_LH_CUSTOM_ACTION', 'tooltip' => 'LBL_LH_CUSTOM_ACTION_TOOLTIP', 'acl_action' => 'edit', ), ), ), ); Finally, create labels under Quotes for the label and tooltip indexes. To accomplish this, create a language extension: ./custom/Extension/modules/Quotes/Ext/Language/en_us.lh-custom-action.php <?php $mod_strings['LBL_LH_CUSTOM_ACTION'] = 'Custom Action'; $mod_strings['LBL_LH_CUSTOM_ACTION_TOOLTIP'] = 'Custom Action Tooltip'; Once the files are in place, navigate to Admin > Repair > Quick Repair and Rebuild. Your changes will now be reflected in the system. Group Header The Group Header contains the name and options for each grouping of quoted line items.   Modifying Fields in the Group Header
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-11
  Modifying Fields in the Group Header To modify the Group Header fields, you can copy ./modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.php to ./custom/modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.php or you may create a metadata extension in ./custom/Extension/modules/Products/clients/base/views/quote-data-group-header/. Next, modify the $viewdefs['ProductBundles']['base']['view']['quote-data-group-header'] index to add or remove your preferred fields. Example The example below will append the group total (product_bundles.subtotal) field to the Group Header. It's important to note that when adding additional fields, that changes to the corresponding .hbs file may be necessary to correct any formatting issues. ./custom/modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.php <?php $viewdefs['ProductBundles']['base']['view']['quote-data-group-header'] = array( ... 'panels' => array( array( 'name' => 'panel_quote_data_group_header', 'label' => 'LBL_QUOTE_DATA_GROUP_HEADER', 'fields' => array( array( 'name' => 'name', 'type' => 'quote-group-title', 'css_class' => 'group-name', ), 'subtotal', ), ), ), ); If adding a custom field from the Quotes module to the view, you will also need to add that field to the related_fields array as outlined in the Record View documentation below. Once the files are in place, navigate to Admin > Repair > Quick Repair and Rebuild. Your changes will now be reflected in the system. Modifying Row Actions in the Group Header
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html
0160c62e6b45-12
Modifying Row Actions in the Group Header The Quotes Group Header contains row actions to add QLIs and comments as well as editing and deleting QLI groupings. The actions are identified by, the plus and vertical ellipsis or "hamburger" icon buttons. The following section will outline how these items can be modified. To modify the buttons in the Group Header, you can copy ./modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.php to ./custom/modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.php or you may create a metadata extension in ./custom/Extension/modules/ProductBundles/clients/base/views/quote-data-group-header/. Next, modify the $viewdefs['ProductBundles']['base']['view']['quote-data-group-header']['buttons'] index to add or remove your preferred actions. Example The example below will create a new view that extends the ProductBundlesQuoteDataGroupHeader view and append a row action to the Group Header vertical elipsis action list. First, create your custom view type that will extend the ProductBundlesQuoteDataGroupHeader view. ./custom/modules/ProductBundles/clients/base/views/quote-data-group-header/quote-data-group-header.js ({ extendsFrom: 'ProductBundlesQuoteDataGroupHeaderView', initialize: function(options) { this.events = _.extend({}, this.events, options.def.events, { 'click [name="gh-custom-action"]': 'actionClicked' }); this._super('initialize', [options]); }, /** * Click event */ actionClicked: function() { app.alert.show('success_alert', { level: 'success', title: 'Group Header Button was clicked!' }); }, })
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Quotes/index.html