Archives For sugar7

For Sugar Developers, the Dashboard and Dashlet framework provided in Sugar 7 really helps you to build slick reusable Dashlets that can be targeted for certain parts of the app or made globally available anywhere in the app.  They’re also really easy to use which is something we are gonna highlight today.

For a more detailed look at how Sugar 7 Dashlets work then you should read up on the topic in the Sugar Developer Guide.  The focus on this post is to highlight the most basic elements necessary that we can then build upon in later posts.

A quick reminder

Just some quick advice to anyone about to embark on the Dashlet development journey.  We recently featured a post on a common Sugar 7.x dashlet gotcha.  Basically, dashlet metadata gets copied into database when you add a dashlet to a dashboard.  You’ll need to delete the dashlet or the dashboard and add it all over again whenever you modify dashlet metadata.  We are working on making this seamless in future but this is something you should remain aware of when building dashlets.

Creating a Dashlet Summarized

Dashlets are simply Sugar 7 Views that have some extra features added via the ‘Dashlet’ plug-in and an additional metadata requirement. This tutorial will be brief because creating a basic dashlet is incredibly easy.  As with any Sugar 7 view, we will need three files: a JS controller, a PHP metadata file, and a Handlebars template for the presentation.

Shall we begin?

Continue Reading…

In a recent blog post by W-Systems, an Elite SugarCRM Partner, the W-Systems team shows a great example of how to create a custom field type in Sugar 7 that allows you to place specially formatted text within a view.

This loadable module creates a new field type that allows you to format specific text on a record view to make it more noticeable to the reader. For instance if you want to bring special instructions or alerts to the record reader you may want to increase the text font size, change the font color or font background.

This custom field type is a great way to place in-line notifications on the Sugar 7 user interface.  You can also add as many as you want to the same view via Sugar Studio as you can see in the screenshot below.

Example of the custom field showing formatted text on a Sugar 7 Record View

Example of custom field showing formatted text on a Sugar 7 Record View

Custom fields allow Sugar Developers to get a lot of mileage out of a little work.  Developers focused on CRM implementations or who rely on the help of non-programmers to do Sugar administration and configuration should think about how they can use custom field types to get their projects done faster while using less code.

Head over to the W-Systems blog to find out more and try out this package for yourself!

Hey Sugar 7 Developers!

I wanted to make sure the community is aware of our planned refactor of the Sugar 7 Record view in Sugar 7.8.  The main point of the refactor is to move the Record view header pane out of the scrollable DIV that it is inside today.

Open up your browser’s developer tools and inspect the the HTML of a Sugar 7 Record view.  Notice that .headerpane DIV element that contains the header is actually inside the left-hand side .main-pane DIV?  This main pane can scroll up and down and contains the record view and subpanels.

Notice the location of the headerpane DIV in the Sugar 7.5 Record view HTML screenshot

Notice the location of the .headerpane DIV in this Sugar 7.5 Record view HTML screenshot

However!  If you scroll the Record view, the header pane does not move at all.  This is because we use some CSS trickery to stick it to top of the page under the Sugar 7 application main menu.  Unfortunately this has not worked consistently on all browsers and there has been a variety of bugs.

Continue Reading…

Sugar 7 allows you to define your own view metadata for creating new custom layouts and views.  In these custom view definitions, the correct use of the type and name attributes is essential when you want to reuse metadata, controllers, or templates from other Sidecar components. But what are type and name?  How are they used? In this post, we hope to provide you a better understanding of these attributes and how they are used by Sidecar when your components get created.  Most importantly, this post will serve as a guide for the correct use of type and name in your Sugar 7 view metadata that will maximize your ability to reuse.

Read more below!

Continue Reading…

In a recent blog post by W-Systems, an Elite SugarCRM Partner, Christian Wettre showed off a cool enhancement to the Sugar 7 Saved Report Chart dashlet.  Very conveniently, they included a package you can download so you can easily install it and look at the code to see how it works without any fuss.  I just tried it in a Sugar 7.5.1 instance and it worked like a charm!

Since some of the most effective SugarCRM dashboard elements are charts based on reports, I find my dashboards full of those charts. These charts scream out for the ability to dig down into the underlying details. In the current release of SugarCRM 7 it is a little cumbersome to actually do this. We solved this with a code enhancement module that adds a drill down link to any Saved Report Chart dashlet. With this module installed you can click on the drill down link on any report based dashlet to open the dashlets underlying report in a new browser tab.

Head over to the W-Systems blog to see an instructional video and download this package for yourself!

A quick aside.  In production, SugarCRM recommends deploying new custom dashlets instead of overriding the built-in dashlets.  Users will be able find your custom dashlet just as easily as built-in dashlets while allowing the built-in dashlets to get upgraded.

If you’ve browsed the Sugar 7 JavaScript codebase much then you’ll notice that we use Underscore.js all over the place. Use of _.each, _.bind, _.debounce, _.filter, and more are littered throughout the Sugar 7 codebase.  It’s not uncommon to see multiple usages of it on the same line of code.

 this.resize = _.bind(_.debounce(this.resize, 200), this);

In order to get a quick estimate of how often Underscore is used, you can do a quick search for “_.” within JavaScript sources.  The Sugar 7.5 JavaScript codebase turns up 5,976 uses of Underscore.js!

We love Underscore for a couple different reasons.  First off, it helps make our JavaScript code much more readable than if we used vanilla JavaScript everywhere.  Secondly, there’s some handy utilities in Underscore that can be expertly applied to improve Sugar 7 application performance.

Read below to learn how several Underscore.js Function utilities can be used to improve performance and responsiveness of your apps.

Continue Reading…

This would be a good post to bookmark!

Francesca, one of our Sugar Community members, has a great post on the Sugar Community where she lists some of her favorite Sugar 7 resources and asks the community to list their own.  It has become one of our most active conversation threads in the Sugar Community.

In the same spirit, I wanted to summarize the Sugar 7 resources that the community shared in that thread including a few of my own. Let me know if I’m missing anything below!

Continue Reading…