SugarCRM 7 - Adding an action to the listview

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

medium_tent

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.

1. Adding the …


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 Ringmaster …


Continue reading

SugarCRM - Searches with data from indirectly related modules

Posted on Thu 17 April 2014 in SugarCRM • Tagged with searching, sugarcrm, php

Building modules in SugarCRM can cause you to create a boatload of unnecessary relationships, simply because it's convenient to do so. Maybe you'd have a relationship where A relates to B and B to C but you'd like to search for all A module records that relate to C. One …


Continue reading

Build Yii 1.* with composer

Posted on Tue 08 April 2014 in Yii • Tagged with composer, howto, yii, php

image0

While we're looking forward to Yii 2 coming alive, all of the posts on the new version still come with bold text reading something like: So please do not use it for production. So it might be a little while before we have in-built composer awesomeness with Yii. The guide …


Continue reading

SugarCRM - Add a code-driven column to a list

Posted on Sat 05 April 2014 in SugarCRM • Tagged with howto, sugarcrm, php

Sometimes you might find that you want your users to make decisions based on ListViews and you need to pull in relational data beyond the immediately related objects. Example

So using the circus example say you have performers who are performing for a specific show. You might want to see …


Continue reading

Yii issues with Homebrew PHP 5.3

Posted on Fri 04 April 2014 in Yii • Tagged with osx, php, yii

When running yii with a homebrewed install of PHP 5.3, PHP code embedded in HTML wouldn't work. This is because for some inexplicable reason Homebrew's PHP install disables short-tag support. Simply edit /usr/local/etc/php/5.3/php.ini and change short-tags to On.

short_open_tag = On

Also ensure …


Continue reading

Useful bit of SQL to update many records in SugarCRM

Posted on Thu 27 March 2014 in SugarCRM • Tagged with sugar, sugarcrm, php

When GUIDs are you're only option...Cheat!

UPDATE clowns SET deleted=1 WHERE id IN
(SELECT id FROM (
  SELECT id FROM clowns WHERE deleted = 0 ORDER BY id ASC LIMIT 0, 800)
tmp );

Continue reading

Making Drupal 6 Development Suck Less

Posted on Thu 03 October 2013 in Drupal • Tagged with drupal, php, random

image0

So you're here. Like myself probably stuck developing for Drupal 6. All the modules on-line are for the latest and greatest versions of Drupal and you're scouring posts from 2009 to try find that deprecated module you really need. Well his post is dedicated to making your life that little …


Continue reading

Good Coding Practice Snippets

Posted on Sat 24 December 2011 in Projects • Tagged with best-practice, php

After reading through Code Complete I decided to make up mind-maps on each topic in the hope that I would peruse them every so often to brush up on my programming best practice. Recently I decided take a look over them and was dismayed at the amount of knowledge from …


Continue reading

8 randomly useful php tricks

Posted on Mon 22 February 2010 in PHP • Tagged with php, tricks

In keeping with my series of 8's.

1 ) debug_print_backtrace()- I use this one a lot, print a debug-style list of what was called to get thethe point where this function is called. Very, very useful.

2 )__autoload()- Called when you attempt to load a class that hasn't been defined. Example …


Continue reading