Archive for April, 2009

SugarCRM 5.2.0 patch D Released

Friday, April 24th, 2009

I just wanted to bring to your attention that SugarCRM has released 5.2.0d.  Here’s what you need to know:

New Features, Enhancements, and Behavior Changes

A new Repair option named “Repair Non-Lowercased Fields” allows you to use mixed-case field names when searching for records

Fixed Bugs in 5.2d

Bug 20619 – The get_relationships function fails for custom modules.

Bug 20728 – Fields referencing a custom drop-down list that was not created through the Module Builder do not load properly in Module Builder when exported and loaded on another system, and hence cannot be edited in the new system.

Bug 22836 – The Group User name does not display in the record’s Detail View.

Bug 25151 – When you click an email address in the Employees List View to compose an email, the “To” field does not display.

Bug 25485 – When using a SQL Server database, when you sort a paginated Accounts List View by a custom field, the system displays an “incorrect syntax” error if you click the Next button to navigate to the next page.

Bug 25598 – The value Amount of an opportunity is not converted correctly from EUR to USD for a contract with a default currency of EUR.

Bug 25718 – You are unable to import data for custom multi-select fields with default value.

Bug 26666 – You cannot use mixed-case field names in Search forms.

Bug 27476 – When installing Sugar 5.2.0 with MS SQL database, an error prompts Sugar to create a new MSSQL user.

Bug 27490 – Account links in the Contacts dashlet are incorrect.

Bug 27491 – Related record links in the Meetings dashlet are incorrect.

Bug 27564 – When composing an email, personal and group email addresses are not differentiated in the “From” drop-down list.

Bug 27674 – If you do not have the latest Sugar version, the Configure Sugar Updates page displays strange characters.

Bug 27693 – When you click an email address from the Leads List View, the To field does not display the email address of the lead.

Bug 27877 – Roles created for a custom module are deleted if you re-deploy the module.

Bug 28159 – The Campaign Log label incorrectly displays as “Campaigns”.

Bug 28411 – The My Pipeline By Sales Stage dashlet displays wrong total sum value if the user’s default currency is different from the system default currency.

Bug 28412 – Bar charts do not work if the user’s default currency is different from the system default currency.

Bug 28461 – When importing multi-byte data into Sugar, the length is calculated in bytes instead of characters.

Bug 28586 – When you run a cron job from the Suger User Interface or cron.php from the command line, the tracker table is populated when Tracker Actions is the only box selected on the Tracker Settings page.

Bug 29037 – When importing emails, any email with the word “java” in the message ID is imported multiple times.

A full listing of all bugs fixed in this patch including further details on the bugs listed above can be found in the Bug Tracker.

Compatibility Matrix is available here

Known Limitations

Some entry points were changed in Sugar 5.1. Hence, a custom file created in 5.0, unless you manually updated it with the new entry point in 5.1, may fail in 5.2 with the error message “Not a valid entry point”.

For example, if you have customized vCard, navigate to custom\modules\
<modulename>\metadata\detailviewdefs.php
and replace:

<name=”vcard” action=”vCard.php”>

with the following:

<name=”vcard” action=”index.php”>

<input type=”hidden” name=”entryPoint” value=”vCard”>

SugarCRM’s Resource Limits

Wednesday, April 22nd, 2009

This post is for SugarCRM system administrators developers.

System Administrators  –  If you’re running a SugarCRM system, keep some of these tips in mind.

Developers – These are just good things to know.

Sometimes “user initiated processes” turn into runaway processes on the server.  For example, someone may create a tool that iterates through a result set from the database query, only to do additional queries based on the result. The tool may work well for the developer on their dev environment, but it may not scale well.  These kind of actions turn into runaway processes.

Many different platforms impose quotas/limits.  SugarCRM is no different.  In the 5.1 release we created database query limits.  As a developer, you should be aware of these so that you can develop code accordingly.

In config.php you’ll find a section of the $sugar_config array that looks like and is controlled like this:

'resource_management' =>
array (
'special_query_limit' => 50000,
'special_query_modules' =>
array (
0 =>'Reports',
1 => 'Export',
2 => 'Import',
3 => 'Administration',
4 => 'Sync',
),
'default_limit' => 1000,
),

This is the “out of the box” configuration – of course you can change this (c’mon this is SugarCRM, you can modify anything!).

Some intentionally resource intensive features such as Reports, Exports, Import, Offline Client, and anything in the Admin section are allowed to have 50,000 queries.  Otherwise, the default is 1000 queries.  You can modify this to fit your needs.

The best way to modify this is in config_override.php using $sugar_config['resource_management']

Another feature that allows you to manage access to some key administrative areas of your Sugar system is the following setting:


$sugar_config['admin_access_control'] = true;

Some of the actions that this setting will disable are features in the admin panel:

  1. Backups
  2. Upgrade Wizard
  3. Module Builder

The full list is detailed in files_access_control_map.php and is easily expanded in custom/include/MVC/Controller/file_access_control_map.php.

A final security control allows you to restrict Module Loader to read modules from only a specific directory on the server and disables the ability to upload new modules into the Module Loader.


$sugar_config['use_common_ml_dir'] = true ; // to enable or disable the feature.

$sugar_config['common_ml_dir'] = '/path/to/your/directory'; // modules will be loaded from this directory.

Remove a Tab, keep the Subpanel

Tuesday, April 21st, 2009

I was speaking with one of Sugar’s stellar Customer Support Engineers today when we came up with this little tid bit…

The problem:

The customer wanted to remove the Opportunities tab, but keep it as a subpanel in a detailview – oh and make it upgrade safe.

The solution:

The modules that are displayed or hidden are (for the most part) by include/modules.php

If you view include/modules.php, you’ll notice that there are multiple arrays.  Most importantly, there is a way (at the very end) to override this file:


if (file_exists('include/modules_override.php'))

{

include('include/modules_override.php');

}

if (file_exists('custom/application/Ext/Include/modules.ext.php'))

{

include('custom/application/Ext/Include/modules.ext.php');

}

I prefer to keep all customizations in the “custom” directory – so let’s use .custom/application/Ext/Include/modules.ext.php

After creating the file, this is the code we added:


<?php

$modulekey = array_keys($moduleList, 'Opportunities');

foreach($modulekey as $key =&amp;amp;gt; $value){

unset($moduleList[$modulekey[$value]]);

}

$modules_exempt_from_availability_check['Opportunities'] = 'Opportunities';

$modInvisList[] = 'Opportunities';

?>

The critical array here is “$modules_exempt_from_availability_check”.  This array adds the subpanel back into the view.

Also, it’s worth noting the gymnastics we used to unset the array.  That’s because you need to unset it by the array’s index….  Because it’s possible that we someone else could put “Opportunities” in the moduleList array multiple times, we loop through it.

Finally, to date (the 5.2.0c), modules.ext.php would get over-written by Module Builder if you deploy a module.  That means, if you make a module, this custom code would get destroyed.  The simple solution, is to put it in the other place -> include/modules_override.php.  While that’s safe, it’s keeping custom code out of the custom directory.  A bug has been filed and we’ll see a fix in future releases.

If you can think of ways that will help create better hooks for customizations in the custom directory, please let us know!  We’re always looking for ways to make Sugar even more upgrade safe with customizations.

Sugar 5.5 and Internet Explorer 6 support

Friday, April 17th, 2009

IE 6 LogoAs a part of the upcoming Sugar 5.5 release, we are doing a major overhaul on our Theme framework. Not only will these make it easier to build new themes and customize the out-of-the-box themes, but we’ll also be optimizing our CSS and Javascript code to decrease payload and load times, providing a much better user experience. But we have one potential roadblock to that:

Internet Explorer 6.

Released in the fall of 2001 ( that’s nearly 8 years ago now! ) it is woefully out of date in terms in CSS and Web standards compliance, especially in comparision to “modern” browsers such as Mozilla Firefox, Apple’s Safari, and it’s successor Internet Explorer 7. The blogosphere has been aflutter with the news of dropping IE6 after Microsoft’s announcement of the automatic updates to IE8. We are considering removing IE6 support as well, since doing so will allow us to simplify our testing/support matrix, and remove lots of IE 6 customizations from our code.

We are looking for feedback from the community on the impact of this potential change. Please leave any thoughts you have about this ( good or bad ) in the comments below or in the forum.

PHP & Windows Server 2008

Monday, April 13th, 2009

I just ran across Microsoft’s new website for PHP and Windows Server 2008 and I there are several reasons why I wanted to bring it to your attention.

  1. Sweet! Easy to install PHP w/ IIS & SQL Server environments
  2. Humility
  3. The power of Open Source
  4. The website looks like Super Mario Bros.

I have been installing PHP on a wide variety of environments for the past 5+ years. I am (oddly I suppose) out of my comfort zone with playing with IIS & SQL Server.  It’s nice to see that Microsoft has gone out of their way to make this easy.

Which brings me to my second point, did you catch the humility on the site?  This is the first sentence on the website:

We know PHP hasn’t always run smoothly on the Windows platform, so we’ve now optimised Windows Server 2008 to support your applications through a new component, FastCGI.

That is quite an admission on part of Microsoft and it’s nice to see them take that tack.  This brings me to my third point: PHP has made an incredible grassroots impact on those involved in the internet industry.   I would have never guessed  5 years ago that Microsoft would be supporting PHP so much.  Cool!

I suspect since Microsoft is heavily invested in Facebook, which runs primarily on the PHP platform that we will continue to see Microsoft become increasingly involved in the development of PHP. Now that Facebook user-base has surpassed 200-million, Microsoft would like to see Facebook using Microsoft servers.  To do so, I think they will have continue to find ways to make PHP ultra high performance on Windows.

Finally, what’s up w/ the 8-bit Super Mario Bros. webpage?  I like that it panders to my nostalgic geekiness, but I can’t draw the connection.  Anyone want to take a guess why the Super Mario Bros. theme?

How To Exclude Archived Emails from Outlook To-Do List

Friday, April 3rd, 2009

If you are an Outlook Plug-in user, you may have noticed that the act of archiving emails into Sugar will add a flagged task to your To-Do list in Outlook 2007.  The task will have the subject of the email, and will have a category of SugarCRM. (Note: This is expected behavior for the Outlook Plug-in)

This is the mechanism that we use to denote whether or not an email has already been archived to Sugar, but you may find that it’s cluttering up your To-Do list.  If this is disrupting your normal use of the To-Do list, you can customize your Outlook views to filter out these tasks.

These are the basic steps, and please consult with Microsoft’s documentation for further detail.

1. Right-click within the To-Do Bar, and select the customize “Current View” option.

screen-capture-2
2. Choose the Filter button, then the Advanced tab.

screen-capture-3

3. Select the Field dropdown under the “Define more criteria” heading, and choose All Task Fields >> Categories from the 4. dropdown.

4. Set the Condition to “doesn’t contain”, and set the Value to “SugarCRM”.  Click the “Add to List” button.

screen-capture-4

5. Click OK in the Filter dialog window, and then click OK in the Customize View: To-Do List dialog.

6. Your To-Do Bar will no longer display the task for the email that was archived to Sugar.

screen-capture-5

You can repeat these steps for the Tasks view within Outlook.

The original email message will retain the flag in the Mail view, to indicate that you’ve already archived the message to Sugar.

screen-capture-6

Scaling Guidelines

Thursday, April 2nd, 2009

One thing I have learned from my Professional Services & Support experiences was: performance is critical for a great user experience.

As PHP/SugarCRM engineers, we must keep in our minds at all times the best practices for scalability, high availability, and speed.  For example, we learned a lesson when we initially created the Emails module.  We stored every email message in the database. Well guess what, that works great for 1 user… maybe even 10 users.  But, when it’s a company of 100 or 1000 or 10,000, that model didn’t scale well and it resulted in our rewrite for Emails in 5.0.

The email module scales better now and it’s because scaling was in the forefront of our mind.  Performance engineering is an important part in our development process.

So when I saw this article on one of my favorite blogs, I thought I share it with you.  The author, Haytham El-fadee, wrote excellent guidelines that we should always be thinking about when we code. While most of his blog posts deal with programming languages not relevant to SugarCRM, the Art of Scalability is relevant to all of us.

PHP Testers needed

Thursday, April 2nd, 2009

PHP is critical to the success of SugarCRM and each one of us as engineers.  So I want to get this news out there – the PHP project is looking for testers on their next release.

In my humble opinion this is an excellent chance for us, the SugarCRM developer community, to put our 2 cents in and also get to meet our fellow PHP’ers.

It looks like  you can ask your local PHP user group to host a test fest.  So no worries if you don’t see your town there – just help organize. Happy Testing!

Dutch PHP Conference

Thursday, April 2nd, 2009

Did you know the Dutch would be throwing a fabulous PHP conference?

Well consider yourself in “the Know” now.  If you’ll be in Amsterdam around June 11th to the 13th, this is a great chance to plug into the PHP community.  There are going to be some amazing presenters and it would be awesome if the SugarCRM dev community could represent.

The presentations on caching and UTF8 look especially relevant to Sugar development and implementation.

If you’re thinking about going, let me know and hopefully I can help you organize a meetup.

Also, if you think I should go (I think I should go!) give me a shoutout down below. Hahaha!

Secret Configuration Settings To Make Your Life Easier

Wednesday, April 1st, 2009

It’s been awhile since I’ve blogged.  It’s nice to be back and I am going making it a much more regular thing – I promise.

I thought for my comeback post, I would share some of the deepest secrets of SugarCRM configuration.  These options are sooo l33t that I feel like I can only share them on my comeback post.  You’ll be amazed.

However, I *must* add this disclaimer:  Your mileage may vary.  Use at your own risk.  Test in a development version first.  DO NOT PUT IN PRODUCTION without testing.

Seriously, please make sure it works in your dev environment first. I don’t want to crash the forums or overburden Support with requests if this doesn’t work for you.

Ok here it goes:

In ./config_override.php try these out:


$sugar_config['make_me_coffee'] = true;

$sugar_config['do_my_laundry'] = true;

$sugar_config['donuts_yum_yum'] = true;

So try them out.  If they don’t work for you, you probably have set something up wrong.  Try file permissions or something like that.  Don’t bother submitting a case, support doesn’t support these options.  You can try your luck on the forums, good luck!

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