Archive for January, 2009

Sugar 5.2 Dev Guide posted, Sugar 5.5 forums now live

Thursday, January 22nd, 2009

If you have already noticed Colline Lee’s post about writing cloud connectors we have posted an updated version of the developer guide for the 5.2 release.

There is a lot of activity around here as SugarCon is just over a week away.  On Februrary 2-4 customers, partners, and community members will gather in San Francisco to soak up a lot of great content we have put together around all things Sugar.

A big piece of SugarCon will be sessions by members of the Sugar Engineering team who will be covering a range of topics around the up and coming Sugar 5.5 release as well as what we are planning for Sugar 6 later at the end of the year.

In preperation for SugarCon we have launched some new forums around Sugar 5.5 so that we have a place to post content early and solicit feeback and questions from the community members.

With the 5.5 release we are finishing up a few platform updates that begun with the release of Sugar 5 and the new MVC framework.  Items such as updating the web services and theme frameworks, adding REST support, as well as a new addition to Studio to edit wireless layouts.

If you are heading to SugarCon we look forward to seeing you there.  For the rest of you, head on over to the forums for 5.5.  We will be adding content during the event all the way up to the release.

Writing a Cloud Connector for Sugar 5.2

Thursday, January 22nd, 2009

A new item in the 5.2 release is the Cloud Connector framework. The framework allows developers to integrate data from external Web Services and widgets into their SugarCRM installation.   Data from existing modules such as accounts, contacts, and leads may act as inputs to retrieve external data.

For the Community Edition, the framework will allow the placement of what we call Cloud View Icons on fields in a record’s detail view. When you place your cursor over the icon, it activates the code in the Connector, typically a search of an external data provider. These icons may link to external web services or widgets to retrieve additional information. For Sugar 5.2 we included support for LinkedIn©’s Company Insider widget in the Community Edition release which can be used as an example connector to learn the framework and create your own.

In Sugar Professional and Enterprise the system will also contain additional connectors (e.g. Hoovers© and Jigsaw©) and have the ability to merge the data into existing records.

The main components for the framework are the factories, source and formatter classes.

The factories are responsible for returning the appropriate source or formatter instance for a connector. Sources are responsible for encapsulating the retrieval of the data as a single record or a list or records of the connectors. Formatters are responsible for rendering the display elements of the connectors.

For more details on the framework and getting started writing your own connectors check out the updated 5.2 developer guide.

Care and feeding of the Sugar Feed system

Tuesday, January 13th, 2009

You may have noticed a new admin link called Sugar Feeds in the admin section after you installed 5.2 and wondered what it did. In a nutshell, the Sugar Feeds feature is a way for all of your users on the system to be better informed about what is going on in the system around them.

Getting Started

To get the Sugar Feed system going, head on over to the Sugar Feed Settings screen and click the “Enable Sugar Feed” check box. What you now have is a choice of what modules to enable. Each of the modules will automatically (through the logic_hook system) populate the feed system when specific activities happen. For example, the Cases feed will put a feed entry in when a Case is created, or has it’s status set to “Closed” and the other module feeds work in much the same way. Now, the User Feed on the other hand is there so your users can post their own entries for other users to see. If things get out of hand all feed entries can be deleted by either the user that posted them, or an admin. So, that’s that with the basics, I bet now you want to know how to mold the Sugar Feed system to your will.

Adding A Module Feed

You may want to add a new module to be monitored by Sugar Feeds or you may want to change how an existing module is being handled. Module feeds are picked up by the Sugar Feed system by looking at the modules/<module>/SugarFeeds/ and custom/modules/<module>/SugarFeeds/ directories and finding all of the .php files in there.

If you want to override an existing feed, just place a file with the same name in the module’s custom SugarFeeds directory and it’ll use that one instead. Be sure to name the class the same as the filename (ie, CaseFeed.php == CaseFeed), otherwise we won’t pick it up. For a good example, I would use the “modules/Cases/SugarFeeds/CaseFeed.php” as an example to build from.  It shows how to recognize new records, and status changes of records which will probably be your base for most feeds. Now, once you do create a new feed there is one more thing you need to do, head on over to the “Quick Repair And Rebuild” page in the Repair section in the admin panel, and uncheck everything but “Clear Sugar Feed Cache” and click “Repair.” This will tell the Sugar Feed system to throw it’s cache away and rebuild it by looking at all of the files in each of the SugarFeed directories. After that just head into the Sugar Feed Setting page again and click your new module.

Adding A User Feed Type

The other half of the feed system is the user feeds. If you click the link to the left of your name on the Sugar Feed dashlet you will notice that it will let you insert a link, a YouTube™ video, or a URL. We didn’t leave you out in the cold on these either, you can go ahead and just stick a new file in “custom/modules/SugarFeed/linkHandlers” and the Sugar Feed system will pick it up as soon as you flush the Sugar Feed cache. Check out “modules/SugarFeed/linkHandlers/Link.php” as a good simple example, or “modules/SugarFeed/linkHandlers/Image.php” as one with a bit more complexity going on.

Enjoy the new Sugar Feeds!

Integrate with any Web 2.0 content using My Portal Dashlet

Thursday, January 8th, 2009

A feature of SugarCRM 5.2 that I’ve been playing with a lot is the new My Portal Dashlet. What it allows you to do is embed any website into your Home or Dashboard page by simply providing the URL to the website. While there is a lot of web content that really isn’t suitable for being contained within a window this small, there is quite a bit out there that works great for this. Let’s take a look at a few examples.

Google Talk

Google Talk is a very popular IM client built upon the Jabber protocol. One lesser known feature is that Google provides a gadget for Talk that is designed to be embedded into any web page. This works perfectly with the My Portal Dashlet in SugarCRM 5.2; simply add a new My Portal Dashlet with the URL as http://talkgadget.google.com/talkgadget/popout and the title as Google Talk.

Google Talk emedded in SugarCRM 5.2

Mobile Versions of Web Sites

With the proliferation of the mobile web, many web sites have developed mobile versions of their site optimized for mobile phones and PDAs. These websites are often accessible via a normal web browser as well, so embedding them into our SugarCRM Home or Dashboard page is very simple. Below is an example of adding the mobile version of the Lifehacker website; simply enter the URL as http://m.lifehacker.com/ and the title as Lifehacker.

Lifehacker.com in SugarCRM 5.2

RSS Feeds

Just about every content site has some sort of RSS or Atom feed available, which are designed to work with many of the feed readers available such as Google Reader or Bloglines. One feature of newer browsers such as Firefox 2 and 3, Safari, and IE 7, is the ability to render these feeds directly in the browser as well. We can use this built in ability to have any RSS feed available in the My Portal Dashlet. The below image is an example of integrating the Slashdot RSS feed using the Safari web browser; we simply need to add the Dashlet with the URL http://rss.slashdot.org/Slashdot/slashdot and the title Slashdot.

Slashdot in SugarCRM 5.2

This is really just the tip of the iceberg for possibilities here. Feel free to post below in the comments ways you have used the My Portal dashlet.

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