Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 4 Customizing Sugar : Introduction : Tips & Pitfalls

Tips & Pitfalls
Making upgrade-safe customizations
Because SugarCRM is an open source application, you have access to all of the source code. Keep in mind that just because you can change the code doesn’t mean that you should. Any code customizations you make to the core files that ship with the SugarCRM distribution will need to be merged forward or re-factored manually when you upgrade to the next patch or major release.
However, any changes you make using the developer tools provided in the Admin screen (Module Builder, Studio, etc.) are upgrade-safe. Also, any code changes you make in the custom/ directory are also upgrade-safe.
Installing Third-Party Modules
Be aware that not all third-party modules you install in your Sugar system (such as modules found on SugarForge.org) have been designed to interoperate error-free with other modules and may not be upgrade-safe. Code changes made by a third-party developer and distributed in a module could potentially modify core files which would require special attention during an upgrade. Also, two different modules could conflict with one another in the changes they make to your system.
Naming Your Custom Modules
If you create a new module or Sugar Dashlet and don’t use the Module Builder tool to do this, be sure to name your new directories uniquely. This will prevent conflicts with future modules added by the Sugar team. For instance, a best practice would be to add a unique prefix to your new module’s directory name such as “zz_Brokers” for a new Brokers module.
Be Familiar with Object Oriented Programming
Much of extending the Sugar functionality is based around extending and overriding the SugarCRM base classes. Developers need to be familiar with the basics of object-oriented programming and are encouraged to only extend the SugarCRM base classes to the minimum extent necessary.
Use Developer Mode when Customizing the User Interface
When developing in SugarCRM, it is suggested that you turn on Developer Mode (Admin->System Settings->Advanced->Developer Mode) which causes the system to ignore the cached metadata files. This is especially helpful when you are altering templates, metadata or language files directly. When using Module Builder or Studio, the system will automatically refresh the file cache. Be sure to turn Developer Mode off when you have completed your customizations as Developer Mode does degrade system performance.

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License