Pages

Tuesday, April 27, 2010

SugarCRM Troubleshooting: IMAP Connectivity

You may have read my previous post from a few months ago where I discuss a potential scenario that may keep you from being able to use the SugarCRM email client for IMAP accounts that require SSL.

While troubleshooting similar connectivity issues, I have found it helpful to use some PHP scripts to perform the basics of verifying that the server is actually capable of connecting to the mail server.  

Assuming we cannot connect through the scripts, it would make sense that we would also not be able to connect via SugarCRM.  

Some of the common reasons for not being able to connect include:
  • Firewall restrictions
  • Missing PHP extensions (e.g. IMAP)
  • Incorrect account information 
Should any of those (or other) conditions exist, the scripts will fail and you know you need to look elsewhere for your solution, instead of within SugarCRM.


Thursday, February 18, 2010

SugarCRM Customization: Styled Data

Want to make something stand out on the DetailView of your records? Here is a quick way of doing that: add some CSS styling to it.

The best part is that it is very simple to apply this effect.  In order to apply styling to a value (say, to make it show up in red) for a field named interest_c, add the following line to the field's definition array in detailviewdefs.php stored in custom/modules/Contacts/metadata

'customCode' => '<span style="color: red">{$fields.interest_c.value}</span>',

SugarCRM Logic Hook: Proper Casing Fields

Sorry for my absence. Been meaning to write, but been caught up with other cool things.  Anyway, wanted to post a quick and easy one that many might find helpful. 

One of the biggest challenges with a database application such as SugarCRM is ensuring that data is entered in a uniform manner by its various users. The use of drop down and multi-select fields helps address this challenge quite well, but said field types cannot be used in all places. 

A good example of where they cannot be used is the Last Name field on a Contact entry. However, at the same time, it would be nice to be able to enforce some uniformity in the field's values, for example, ensure that names are being entered in proper case.  

This need provides us with a great opportunity to once again highlight the power of logic hooks. In our example, the uniformity we want to introduce is the proper casing of the text entered into the Last Name field. Thus, values that are typed in as "doe" are automatically corrected and saved to the database as "Doe."

A logic hook is the perfect solution as it is transparent to the user and easily extended to support other fields.

Lets take a look at how we can accomplish the above...