Blog Archives

Convert the country text field in SugarCRM CE or SuiteCRM to a drop-down list

If you need to change the country text field into a drop-down list in any of the sugarCRM’s modules this post will show you how. Step 1 Create the vardef for your country field custom/Extension/modules/[THE_MODULE_NAME]/Ext/Vardefs/custom_primary_address_country.php Step 2 Make a copy

Posted in SugarCRM development and customisation, SugarCRM development development hints and tips

How to Change the Account Name field back to a relate field in Leads

In sugarCRM CE the relationship between Leads and Accounts has been changed so that in the Leads editview, the account name does not show as a standard relate field. If for whatever reason you would like to change this back

Posted in SugarCRM development and customisation

Working out percentages in a Mysql query for reporting tool zuckerreports

Although not strictly Sugarcrm related I had requirement the needed me to work out the percentage of opportunities which had the sale_stage field set to ‘Closed Lost’ and ‘Closed Won’. This would be displayed as part of sugar via Zuckerreports,

Posted in General Programming

Logging custom error messages in SugarCRM

Depending on what your Log Level is set to in the system settings you can log errors to the sugarcrm.log located in the root folder with the following code snippets

Posted in SugarCRM development development hints and tips

Redirect with a custom error message in SugarCRM

If your looking to redirect with a custom error message in Sugarcrm the following code snippet shows you how to do it. This could be used within a controller action for example if a certain condition is not met then

Posted in SugarCRM development development hints and tips

Adding custom JavaScript to a view in SugarCRM

If you need to add custom JavaScript to a view in SugarCRM the first thing you need to do is create your script file and place it in the custom folder of the module you want to add the client

Posted in SugarCRM development development hints and tips