Sugar Developer Blog

Working on the Developers Guide

27 Jun, 2008
Posted By: Clint

The much anticipated and long awaited Developers Guide is in the works.  We will be making the first public copy available for comment in a few weeks.  Based on the content in the Wiki and various developer notes written by the Sugar team, the Developers Guide will detail the internals of the Sugar code and how to customize the system.

Below you will find the current Table of Contents.  I’d love to hear your feedback on the current structure of the guide.

SugarCRM Developers Guide

Table of Contents

1.0 SugarCRM Overview
1.1 Platform Overview
1.2 Application Framework Overview
1.3 Directory Structure
1.4 Key Concepts
1.5 Entry Points
1.6 Module Framework Overview
1.7 Module Builder
1.8 User Interface Framework Overview
1.9 Extension Framework Overview
1.10 Dashlets Overview

2.0 Application Framework
2.1 Directory Structure
2.2 Entry Points
2.3 Dashlets
2.3.1 Dashlet Files
2.3.2 Templating
2.3.4 Categories
2.3.5 Dashlet Base Class
2.3.6 Dashlets JavaScript
2.4 Browser JavaScript
2.4.1 Accessing Language Pack Strings
2.4.2 Quicksearch
2.5 Databases
2.5.1 Primary Keys
2.6 ACL
2.7 Scheduler
2.8 Workflow
2.9 Logger
2.9.1 Logger Level
2.9.2 Log File Name
2.9.3 Log File Extension
2.9.4 Log File Date Format
2.9.5 Max Log File Size
2.9.6 Max Number of Log Files
2.9.7 Log Rotation

3.0 Module Framework
3.1 Overview
3.2 MVC and Metadata Framework
3.2.1 Model-View-Controller (MVC) Overview
3.2.2 SugarCRM MVC Implementation
3.2.2.1 Model
3.2.2.2 Controller
3.2.2.3 View
3.3 Metadata Framework
3.3.1 Background
3.3.2 SearchForm Metadata
3.3.3 DetailView and EditView Metadata
3.3.4 SugarField Widgets
3.3.5 SugarFields Widgets Glossary
3.3.6 Metadata Framework Summary
3.4 Vardefs
3.4.1 Dictionary Array
3.4.2 Fields Array
3.4.3 Indices Array
3.4.4 Relationships Array
3.5 Relationships
3.6 Subpanels
3.6.1 One-to-Many Relationships
3.6.2 Many-to-Many Relationships
3.6.3 Relationship Metadata
3.6.4 Layout Defs
3.6.5 Language
3.7 Shortcuts

4.0 Customizing Sugar
4.1 Developer Mode
4.2 Packaging Customizations for Installation
4.2.1 Introduction
4.2.2 Manifest Array Elements
4.2.3 Installdef Array Elements
4.2.4 Upgrade Manifest Array
4.2.5 Sample Manifest File
4.3 Module Builder
4.3.1 Packages
4.3.2 Module Templates
4.3.3 Deploy vs Publish
4.4 Business Logic Hooks
4.4.1 Hook Definition
4.4.2 Caveats
4.4.3 Available Hooks
4.4.4 Packaging Custom Logic Hooks
4.4.5 Using Custom Logic Hooks
4.5 UI Customizations
4.5.1 Custom Grouping of Values
4.5.2 Custom Buttons
4.5.3 Creating New Custom Displays
4.5.4 Overriding the Metadata Framework
4.5.5 Creating a Custom SugarField
4.5.6 Adding QuickSearch to a Custom Field
4.5.7 Tips & Pitfalls
4.6 Adding Custom Jobs to the Scheduler
4.7 Extending Workflow
4.8 Creating New Dashlets
4.8.1 Generic Dashlet Creation
4.8.2 Custom Dashlets
4.8.3 Packaging Custom Dashlets
4.8.4 Refreshing the Dashlet Cache
4.8.5 Modifying the Default Dashlet Setup for New Users
4.9 Creating New Themes
4.9.1 Overview
4.9.2 Steps to Create a New Theme
4.9.3 Packaging Custom Themes
4.9.4 Example Manifest File
4.10 Creating Language Packs

What’s new at Sugar U

27 Jun, 2008
Posted By: Clint

If you’ve taken a look at Sugar Univeristy lately, you will have seen that Sugar U has expanded beyond just providing online training.  There are now a series of classroom-based trainings.  The two offerings are 1) the two-day Admin Fundamentals class which is great for anybody who will be managing a SugarCRM installation and 2) the two-day Sugar End-User Train-the-Trainer class which is for project leads and super users who will need to train your end-users.

Both classes have excellent hands-on labs and you will leave with an in-depth understanding of SugarCRM that will be key to your success with Sugar.  Sign up for the classes here.

The Sugar 5 train keeps rolling with 5.1

24 Jun, 2008
Posted By: Manoj Jayadevan

This is my first post in the Sugar Developer Blog, so first a quick introduction. My name is Manoj Jayadevan and I run product management here at SugarCRM. My team works with the community, customers and development team to plan and prioritize the SugarCRM product roadmap. I’ve been with Sugar for over three years now and am really excited to have helped bring you Sugar 5.

Sugar 5.0 has been in the wild for almost 7 months now and you are probably curious what the Sugar team has been cooking up in the meantime. Well, the wait is almost coming to an end. Sugar 5.1 is expected to be released by the end of July 2008 and will have many functional and platform enhancements that the developer community has been waiting for.

The key focus of 5.0 was to make the Sugar platform easier to extend, customize and maintain. We have big plans for SugarCRM. But to create and build advanced features, the foremost requirement is to have a solid and modern platform. Hence in 5.0, we focused all our energies to build the most modern business application platform on the planet. Now that we have a solid platform, it is time to add the bells and whistles to the application.

The functional enhancements in 5.1 are focused around cross-module reporting, import enhancements, tracking system usage, completing the new email client, and taking Studio and Module Builder to the next level. The platform level changes in Sugar 5.1 are very minimal and are primarily focused around our on-demand platform.

Building new features is good, but fixing existing bugs is even better. One of the key drivers for 5.1 is quality improvement. We are addressing over 800 bugs found just in 5.0. These issues are prioritized based on all the feedback from the community and commercial customers. Special quality improvement emphasis has been placed on the Email module and the upgrade process. We are also diligently fixing Sugar 5.0 issues through 5.0 patch releases. In all, we will fix more than 1400 bugs in 5.1 before we ship the GA version next month. Sugar 5.1 will quickly prove to be a very stable application platform.

Now let’s talk features. CRM systems are great at capturing diverse information from customer interactions. This data is no good until aggregated and presented in a meaningful and readable fashion. The Sugar 5.1 reporting engine available in Sugar Professional and Sugar Enterprise is designed to do exactly that. The design philosophy for the 5.1 reporting engine is to provide an easy-to-use yet powerful report builder for end users to generate complex reports. Our goal is not to build yet another general purpose analytics tool, but to provide 90% of CRM reporting use cases using a cross-module report builder. Key enhancements include an AJAX based wizard driven UI, the new matrix report type, tools to create complex filters, support for inner and outer joins, dynamic run-time filters and more.

More reporting improvements ………The Tracker we know today is the small bread crumb bar at the top of every screen that shows the navigation path of the user in the application. But Tracker has more depth to it than what initially meets the eye. In Sugar 5.1, Tracker will be able to capture information like session history, user activities, resource usage etc. Some of the sample reports that can be generated include: who is online, who are my top employees by CRM usage, what modules are used the most. These reports will provide key performance indicators to users and managers for better insight to manage the adoption of SugarCRM within their business. These reports are available only in Sugar Professional and Sugar Enterprise but the tracker engine is available in Sugar CE version as well.

Even more reporting improvements ………To provide additional tools for reporting, we have built a new plug-in for Excel. Why reinvent the wheel when Excel can crunch the numbers for you? This new plug-in installs into Office 2007 and Office 2003 and allows users to move and update data between SugarCRM and Excel without any extra export/import steps. Users can also search for information like reports and accounts from within Excel and transfer the data once the source is located in the CRM system. The Sugar Plug-In for Excel is available in the Professional Edition and Enterprise Editions and is included in Sugar Network for Sugar Community Edition users.

Reporting on data is good…..But how do we get data into the application? ….For that we revamped the import tool in Sugar 5.1. The new tool is completely redesigned and special attention is provided to make imports fast and scalable. The redesign and most of the coding comes from Sugar Community legend, Ken Brill, who has joined the Sugar team and now enjoys spending his time working with Sugar customers. We have observed tremendous improvements in the speed and amount of data that can be imported. Our design goal is to attain an import rate of 10,000 records per minute or more. There is also support for more intuitive duplicate checking, error logging and recovery.

Now let’s talk about our beloved Module Builder and Studio. With Sugar 5.0, we introduced Module Builder. This tool is a huge success. This is evident from the proliferation of modules on the SugarForge and SugarExchange. We are furthering the Module Builder in 5.1 by adding much demanded features like one-to-many, many-to-many and one-to-one relationships. Also, Module Builder and Studio will now support a history and rollback feature for bullet-proofing the development process. Last, but not the least, Studio will now support creating and editing of Sugar Dashlets.

Everyone is going wireless. What about Sugar? Our strategy for Sugar Wireless is to use the new powerful and modern browsers in the latest PDA’s to provide users with a rich client experience. We have re-launched Sugar Wireless with many additional features. This is a rewrite of our first generation client and is based on the new MVC framework for UI generation introduced in Sugar 5.0. The key modules like Accounts, Opportunities, Cases, Employees and Activities are exposed through this browser-based Web application designed for small PDA screens. Our long term goal is to make all the modules available in Sugar Wireless that is creatable by Module Builder and editable by Studio. Imagine this - Any module created by Module Builder or edited by Studio will be magically exposed and through Wireless client.

Email and CRM systems? Why do you need an email client in a CRM system? The simple answer is: to keep the sales folks in the CRM system and streamline CRM adoption and productivity. We built an HTML AJAX client in 5.0 with reasonable success. The community provided tons of feedback. The most common feedback was to fix bugs. So we listened. Substantial investment is made in 5.1 to fix email bugs and also to improve the usability and performance. That said, I would like to take this opportunity to highlight our philosophy in building the email client in 5.0. Our goal is to provide a nice clean and simple way to manage email in CRM. We do not intend to build a MS Outlook-like client in the application. We will be adding a few more simple use cases in the near future, but will not build a full-fledged email client.

So as you can see, there are many reasons to move to Sugar 5.1. We will be adding more features and platform enhancements in the future. And all these new features will be built on the Sugar 5 platform. Hence it’s a great idea to migrate and adopt the Sugar 5 platform and leverage all the great work Sugar developers and community members have done.

Thanks and happy coding.

Last week’s Developer Webcast

17 Jun, 2008
Posted By: Clint

We had a great Developer Webcast last Thursday where Sugar Lead Architect Majed Itani went deep into customizing Sugar by building a new Dashlet and creating an RSS Feed for a new Blog module. Lots of coding tips and tricks were covered. If you missed the live session, you can view the recording here. This is a session well worth watching.

There is also a new tutorial posted in the Developer Zone Tutorials page that covers how to programmatically hide and display a panel based on the value of a dropdown.

SugarCRM “sorts out Customer Service” for parade.com

17 Jun, 2008
Posted By: Clint

I always love to hear about how companies are using Sugar to improve their customer relationships. You know the Parade magazine that comes in your Sunday newspaper? See this blog post for how Parade is using SugarCRM for managing customer requests coming in from their parade.com website.

Sugar in the NPO sector

12 Jun, 2008
Posted By: Clint

It’s always great to see the new and innovative ways people are using SugarCRM.  I’ve been recently hearing more and more about Sugar being used by NPO’s to manage their businesses.  I came across this blog post today where a minister in the US is using SugarCRM to help his church track everything from members to events to community business contacts.

I also recently talked to the folks at GOAL, a non-profit aid organization based out of Ireland.  Think of it as the Peace Corps of Ireland.  They have taken Sugar Open Source 4.5.1 and built over a dozen new modules to help their organization track everything from field projects around the world to expense reports from aid workers in Burma.

One of the things I love the most about SugarCRM is how we’ve built an open source platform that is bringing an enterprise-class application to businesses around the world that couldn’t afford the technology before.

Great stuff!

Adding new duplicate check indexes

11 Jun, 2008
Posted By: Clint

So you are ready to import records into your new custom module, but you want to check for duplicates during the import.  The Sugar Import utility does allow you to check for duplicates, but you need to first define what duplicate check indexes are available to check against.

Here is a forum post I just wrote answering how to create new indexes for use during an import.

Creating new chart dashlets

11 Jun, 2008
Posted By: Clint

You love the default dashboard charts that come with Sugar 5.0, but you want a new chart dashlet.  With Sugar Professional you can quickly build a report and then publish the report chart to your Sugar dashboard or homepage.  But what if your are using Sugar Community Edition or you want to create a chart that is not possible to build with Sugar Reports?

One of our top community members, kuske, has written up an excellent forum post on the step-by-step process of how to build a new chart dashlet.  Enjoy!

Enabling import on a custom module in Sugar 5.0

11 Jun, 2008
Posted By: Clint

So you’ve created a new module in Sugar 5.0 with Module Builder, but now you want to import records into that module. Unfortunately in Sugar 5.0, the import function is not automatically enabled for new custom modules. We have addressed this issue in the upcoming Sugar 5.1 but that doesn’t help you today.

For those of you working with Sugar 5.0, here is a link to a sample module where I enabled the import function. You will need to take a look at the code to see how to do the same for your custom modules. I built this in Sugar Community Edition, so it will only install on Sugar 5.0.0 CE. However the approach is exactly the same for the Sugar Professional and Enterprise Editions.

Details
This module package contains a very basic module called “Work”. I built this module in Module Builder (only took 2 minutes, gotta love MB!) based on the Issue template.

When you unzip the module package, you will see directories called EnableImport, icons and SugarModules. Everything in the icons and SugarModules directories is exactly what you get when you create a module with Module Builder and publish the module package.

The EnableImport directory is where I put the necessary code to enable the import function. This directory contains some sub-directories and five files. I will explain those five files below. I also modified the manifest.php for this package to copy over the required files for enabling import and adding in the menu item on the Work module.

Required Files

  1. EnableImport\menus\Import_zz_Work.php - This file is used by the manifest.php to add the Import item to the Work module’s shortcuts menu.
  2. EnableImport\modules\Import\config.php - This file registers the Work module (zz_Work) as a module that can be imported.
    NOTE:
    This is the one out-of-the-box file that you must modify which means this change is not upgrade-safe. You will need to manually merge the one-line change in this file back into your code when ever you do upgrades in the future.
  3. EnableImport\modules\Import\Importzz_Work.php - Contains the logic for actually doing the import. If you need to do any special logic (data manipulation, creating special relationships, etc), you will create special functions in this file that get executed at import.
  4. EnableImport\modules\zz_Work\field_arrays.php - This file is necessary but unfortunately a relic from the past. Up until Sugar 5.1, the Import module does not use the standard vardefs for defining a module’s required fields but rather keys off of this field_arrays.php file that we used back in Sugar 1.0 and 2.0. So you will need to register all of your module’s required fields in this file otherwise your import will fail. Thankfully Sugar 5.1 finally puts this dependency to rest.
  5. EnableImport\modules\zz_Work\Import.php - This file actually calls the Import module code when you click on the Import button.

On a final note, be sure to take a look through the manifest.php file for this package to see how I modified it to install these required files.

Have fun and let me know how this works for you.

Clint

Sugar and Talend at LinuxTag

31 May, 2008
Posted By: Clint

I’m at the LinuxTag event here in Berlin this week and am really pleased with how good of an event it is. It is easily on par with the LinuxWorld events back in the US.  And of course Germany leads Europe in open source enthusiasm and growth.

As always, one of the best parts of attending a conference for me is to see what other companies and projects are doing with SugarCRM.

One of the hits for us at the show has been the Talend connector for SugarCRM. Talend is a commercial open source provider of data integration solutions. With Talend, you can synchronize customer information between Sugar and any other system such as MS Navision or SAP. This greatly simplifies your sales person’s life when it comes to updating customer information. He can simply update the customer’s billing address in Sugar and the change is automatically pushed out to the financials system. They have the Sugar connector built into their Business Connector suite and provide implemenation help as well.  Talend is working with several Sugar customers providing this exact data integration solution today.

Another very cool integration that I saw for the first time is between Starface and SugarCRM. Starface is a very well designed VoIP system that has recently built an extremely cool integration with SugarCRM. When you run Starface for your telephony system and Sugar for your CRM system, your sales people can be working inside of Sugar, a new phone call comes in and the customer record automatically comes up in Sugar. All inbound and outbound phone calls are automatically recorded in Sugar, thereby giving you a very clear and well-organized view of when you talked last with a customer. Like Talend, this is a very real product ready to be installed in your company today.

Have feedback for us? Drop us a line.
Terms & Conditions | Privacy | Trademark Info | Contact Info | FAQs | SugarCRM Inc.© 2004 - 2008 All rights reserved.