id
stringlengths
14
16
text
stringlengths
33
5.27k
source
stringlengths
105
270
5971a67c09e4-1
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
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-2
The following sections illustrate the various ways to implement a customization to a Sugar instance. 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', );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-3
); 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
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-4
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. ./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
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-5
{ //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
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-6
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
5971a67c09e4-7
... ); $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' ) ) );
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/JSGroupings/index.html
5971a67c09e4-8
) ) ); 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
d9f2cd6845b2-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:
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/UserPage/index.html
d9f2cd6845b2-1
./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;
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/UserPage/index.html
d9f2cd6845b2-2
</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 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(
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/UserPage/index.html
d9f2cd6845b2-3
./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
ed134d14e51a-0
Backward Compatibility Overview As 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. For the list of Studio-enabled modules in backward compatibility for your version of Sugar, please refer to the User Interface (Legacy Modules) documentation for your version of Sugar. URL Differences There are some important differences between the legacy MVC and Sidecar URLs. When a module is set in backward compatibility, the URL will contain "/#bwc/" in the path and use query string parameters to identify the module and action. An example of the Sidecar BWC URL is shown below. http://{site url}/#bwc/index.php?module=<module>&action=<action>
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/index.html
ed134d14e51a-1
You can see that this differs from the standard route of: http://{site url}/#<module>/<record id> Studio Differences There are some important differences between the legacy MVC modules and Sidecar modules. When a module is in backward compatibility mode, an asterisk is placed next to the modules name in Studio. Modules in backward compatibility will use the legacy MVC metadata layouts, located in ./modules/<module>/metadata/, as follows: Layouts Edit View Detail View List View Search Basic Search Advanced Search These layouts differ from Sidecar in many ways. The underlying metadata is very different and you should notice that the MVC layouts have a separation between the Edit View and Detail View whereas the Sidercar layouts make use of the Record View. The Sidecar metadata for Sugar is located in ./modules/<module>/clients/base/views/. Layouts Record View
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/index.html
ed134d14e51a-2
Layouts Record View List View Search Search TopicsEnabling Backward CompatibilityHow to enable backward compatibility for modules.Converting Legacy Modules To SidecarHow to upgrade a legacy module to be Sidecar enabled. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/index.html
346848d16596-0
Converting Legacy Modules To Sidecar How to upgrade a legacy module to be Sidecar enabled. Overview After upgrading your instance to Sugar 7.x, some custom modules may be left in the legacy backward compatible format. This is normally due to the module containing a custom view or file that Sugar does not recognize as being a supported customization for Sidecar. To get your module working with Sidecar, you will need to remove the unsupported customization and run the UpgradeModule.php script. Note:脗聽The following commands should be run脗聽on a sandbox instance before being applied to any production environment. It is also important to note that this script should only be run against custom modules. Stock modules in backward compatibility should remain in backward compatibility. Steps to Complete The following steps require access to both the Sugar filesystem as well as an administrative user.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Converting_Legacy_Modules_To_Sidecar/index.html
346848d16596-1
The following steps require access to both the Sugar filesystem as well as an administrative user. Note:脗聽As of Sugar 10.0,脗聽the UpgradeModule.php script has been removed from the codebase. We are providing a zip of the files that were removed so that it is still possible to run the upgrade. Begin by downloading this zip file that contains the previously removed code Unzip the file and move the contents into your Sugar application at ./modules/UpgradeWizard/ To upgrade a脗聽custom module, identify the module's unique key. This key can be easily found by identifying the module's folder name in ./modules/<module key name>/. The module's key name will be in the format of abc_module.脗
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Converting_Legacy_Modules_To_Sidecar/index.html
346848d16596-2
Next, change to the脗聽./modules/UpgradeWizard/脗聽path relative to your Sugar root directory in your terminal or command line application:cd <sugar root>/modules/UpgradeWizard/ Run the脗聽UpgradeModule.php脗聽script, passing in the脗聽sugar root directory and脗聽the unique key of the legacy module:php UpgradeModule.php <sugar root> <module key> An example is shown below:php UpgradeModule.php /var/www/html/sugarcrm/ abc_module The script with then output a series of messages identifying issues that need to be corrected. Once the issues have been addressed, you can then run the脗聽UpgradeModule.php脗聽script again to confirm no errors have been found.
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Converting_Legacy_Modules_To_Sidecar/index.html
346848d16596-3
Once completed, log into your instance and navigate to Admin > Repair > Quick Repair and Rebuild. Test the custom脗聽module to ensure it脗聽is working as expected. There is no脗聽guarantee that the module will be fully functional in Sidecar and may therefore require additional development effort to ensure compatibility. Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Converting_Legacy_Modules_To_Sidecar/index.html
eba8675a1f4a-0
Enabling Backward Compatibility Overview How to enable backward compatibility for a module. Enabling Backward Compatibility Backward Compatibility Mode is not a permanent solution for modules with legacy customizations. If you should need to temporarily get a module working due to legacy customizations, you can follow the steps below to enable the legacy MVC framework.脗聽Please note that switching stock Sugar modules from the Sidecar framework to backward compatibility脗聽mode is not supported and may result in unexpected behaviors in the application. Enabling BWC To enable backward compatibility, you must first create a file in ./custom/Extension/application/Ext/Include/ for the module. If the module is custom, there will already be an existing file in this folder pertaining to the module that you can edit. ./custom/Extension/application/Ext/Include/<file>.php <?php $bwcModules[] = '<module key>';
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Enabling_Backward_Compatibility/index.html
eba8675a1f4a-1
<?php $bwcModules[] = '<module key>'; Once the file is in place, you will need to navigate to Admin > Repair > Quick Repair and Rebuild. The Quick Repair can wait until you have completed the following sections for this customization. Verifying BWC Is Enabled To verify that backward compatibility is enabled, you can inspect App.metadata.get().modules after running a Quick Repair and Rebuild in your browser's console window: Using Developer Tools in Google Chrome Open Developer Tools This can be done in the following ways: Command + Option + i View > Developer > Developer Tools Right-click on the web page and selecting "Inspect Element" Select the "Console" tab Run the following command, replacing <module key> and verify that it returns true: App.metadata.get().modules.<module key>.isBwcEnabled Using Firebug in Google Chrome or Mozilla Firefox
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Enabling_Backward_Compatibility/index.html
eba8675a1f4a-2
Using Firebug in Google Chrome or Mozilla Firefox Open Firebug Select the "Console" tab Run the following command, replacing <module key>, and verify that it returns true: App.metadata.get().modules.<module key>.isBwcEnabled Last modified: 2023-02-03 21:04:03
https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Backward_Compatibility/Enabling_Backward_Compatibility/index.html