Quantcast
Channel: SugarCRM – Ben Hamilton
Browsing index pages (26 articles)

When SugarCRM Case Closed

Using the cases.date_modified is not the same as the date a case is closed, as the case may have been modified after it was closed. Thus, the query below will return the date the case was transitioned...

View Article


Tracking down long running queries in SQL

I’ve had a client whose Linux Server (CentOS) gradually gets slower and slower, then falls over. By logging into the MySQL command line, we were able to see that there were some long running queries...

View Article


Location of the SugarCRM log file

By default it’s in the same base folder as the SugarCRM application files. But on occasion we’ll move it. Quickly find it’s location by looking in the config.php file. The two relevant lines are:...

View Article

Allow a Checkbox to be Mass Update-able in SugarCRM

Here’s how to enable a checkbox to be updated enmasse. First create a new extvardef.php file containing the following: Then put that file into at the following location...

View Article

How to backup SugarCRM from the command line

From the linux command line, these commands let you backup and restore a SugarCRM database. Firstly, for a proper back up of SugarCRM you’ll need two files, one containing the application files, one...

View Article


Find Duplicate Contacts in SugarCRM

Find duplicate contact records, by contact name, in SugarCRM using MySQL.

View Article

SQL Query ORDER BY last_name, then first_name

This snippet of MySQL code shows how to concatenate two fields into one column, also shows how to reverse the concatenation and order by last name then first name.

View Article

MySQL – Counting how many rows have a particular value

Working on a SugarCRM dashboard today, and I needed to count how many records had one value and how many records had a second value. I then wanted to know what percentage the first value was of the...

View Article


Sugar Logic bug with a workaround for date fields

A client is recording the expiry dates of staff blue cards in their SugarCRM database. So I used the following sugar logic to show if the blue card has expired or not:...

View Article


How to change default of Inbound to Outbound for scheduling calls in SugarCRM

When scheduling a call, the default selection for the ‘Direction’ field is ‘Inbound’. Your team primarily performs outbound calls so you would like the default value to be changed.

View Article

SugarCRM screen formatting issue

Angel Magaña explains why, and how to fix SugarCRM screen formatting issue. Summary: it’s the cache folder permissions.

View Article

Sql snippet to show just opportunities from current month

I’m needing to do a sql query to show just the opportunities from the current month, the sql snippet for the WHERE clause to do this is the following: WHERE MONTH(opportunities.date_closed) =...

View Article

Create demo data for SugarCRM databases

Generate records with Tidbit for various Sugar modules.

View Article


How to convert UTC time to current timezone in MySQL

Using SugarCRM (this client is using Enterprise 6.5.15) and we want the last two hundred items in the tracker table. The problem is that the `tracker`.`date_modified` field is in UTC time, not the...

View Article

What to expect when upgrading from SugarCRM 6.5.x to 7.1.5

What to expect when upgrading from SugarCRM 6.5.x to 7.1.5.

View Article


Image may be NSFW.
Clik here to view.

Remove thousand separator in Integers in SugarCRM

We want to record a ‘Year’ value on a record in SugarCRM, but we don’t have a day and month to do with it, you can’t use a field that is of a ‘date’ type as that requires a full date (year, month,...

View Article

Find duplicate records in SugarCRM

Find duplicate records in SugarCRM version 6.5 and version 7.1.

View Article


Using a ternary expression to check if a value is null

Simple test to see if a field is null. I’m using this in Talend to determine if I copy the value into a new note field. You could use a length test, but if the field is a date, then you need to do it...

View Article

Sugar logic to calculate days an opportunity has been open

We want to find out how many days an Opportunity in SugarCRM has been open, using a calculated custom integer field in SugarCRM Studio. I’m assuming you’ve already created a new custom integer field,...

View Article

MySQL snippet for past and next 6 Months

Spent some time today working with DATEDIFF, DATE_ADD and all kinds of horrid looking code before realising that to do a MySQL query to get records where the date is in the past or the next x months...

View Article
Browsing index pages (26 articles)


Latest Images