SugarCRM 7 - Adding an action to the listview headerpanel

Posted on Sat 25 July 2015 in SugarCRM • Tagged with php, sugarcrm

A red button with the words "Take action" on it

This tutorial should show you how to add a custom button/action that will appear across all modules. It's a little similar to this tutorial with a few changes to how the button gets rendered and the actions get called.

1. Adding the button to the headerpanel

Firstly you ...

Continue reading

SugarCRM - Git Version Control Strategy

Posted on Mon 10 November 2014 in SugarCRM • Tagged with git, mysql, php, sugarcrm

git-logo I've found SugarCRM an utter pain to work with in terms of version control for a number of reasons, but the most annoying is simply that certain critical elements of the SugarCRM configuration are stored on the database.

Over time I've worked out a system that circumvents this ...

Continue reading

Better PHP Debugging with Emacs

Posted on Thu 02 October 2014 in Projects • Tagged with debug, emacs, lisp, php

Recently I came across an app called CodeBug, a really nice PHP debugger for Mac. I find debugging PHP really painful within editors such as Vim or Emacs, so up until now I'd been stuck using the incredibly bloated PHPStorm.

On Emacs you can currently use Geben for debugging ...

Continue reading

SugarCRM 7 - Custom subpanels

Posted on Wed 13 August 2014 in SugarCRM • Tagged with mysql, php, subpanels


This tutorial should hopefully help you to create a new subpanel under the Contacts module in Sugar using a custom link class and driven by SugarCRM 7's new SugarQuery API.

1. Create a new link class

This should go into custom/modules/<YourModule>/YourNewLink.php and this class will ...

Continue reading

SugarCRM 7 - Add a new action to a record

Posted on Thu 07 August 2014 in SugarCRM • Tagged with backbone, javascript, php


Odds are if you're customising SugarCRM, you will at some point need to add functionality to the records page. This article shows you a framework for creating actions on the UI, the API entrypoints to run your code and how to link it all together using SugarCRM's sidecar ...

Continue reading

SugarCRM - Versioning Your Database

Posted on Wed 16 July 2014 in SugarCRM • Tagged with git, sugarcrm, php

One issue that constantly re-occurs for me using SugarCRM is that certain knowledge is only stored in it's database. So say you want to revert to a previous version of Sugar and wish to obtain the Studio customisations you've done at that version, say two days ago, well ...

Continue reading

Manage background tasks with PHP-Resque and Supervisor

Posted on Thu 03 July 2014 in PHP • Tagged with php, system, yii


PHP-Resque, the PHP equivalent to Ruby's really nice background process runner is a great way to execute long running PHP processes. Supervisor is a python-based process control system, essentially it's a convenient way to manage custom system processes you need to handle. Combining the two to manage long ...

Continue reading

SugarCRM 7 - Adding a custom column to a list

Posted on Thu 22 May 2014 in SugarCRM • Tagged with javascript, migration, php, rest, sugarcrm

This is the SugarCRM 7 equivalent to this post here, because Sugar has dropped the process record logic hook, we need to come up with a new solution.

Here's how you can add a new column to a list view, I have to admit this is one of the ...

Continue reading

SugarCRM 7 - Adding an action to the listview

Posted on Sun 18 May 2014 in SugarCRM • Tagged with backbone, javascript, php, sugarcrm


There doesn't appear to be a documented way to do this but in SugarCRM 7 this is how I've added actions to the listview. For this example it's showing how to add a button to an animal module, which adds the animal to a related circus event ...

Continue reading

SugarCRM - Search for records related to the current record

Posted on Sun 20 April 2014 in SugarCRM • Tagged with search, sugarcrm, php

Say you have two modules in Sugar: Animals and Ringmasters and they aren't directly related via a standard relationship but they are related through some convoluted means. Now, imagine if you want to override the SugarCRM search to allow you to search for all Animals indirectly related to a ...

Continue reading