SugarCRM — Search for records related to the current record

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, I’ve written about how to do something similar recently. Conversely, you want to search for all Animals related to a Ringmaster you’re currently viewing. It’s not a link that exists in Sugar so you can directly see a Dashlet and you don’t want to build anything from scratch so that’s going to take effort. ...

April 20, 2014 · Shane Dowling

SugarCRM — Searches with data from indirectly related modules

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 option is to maybe related A to C and maintain the relationships by using hooks on save to preserve the A-C relationship. That way you could leverage Sugar relate fields and indirect searching, but that can be a messy choice that adds a lot of complexity if overused. ...

April 17, 2014 · Shane Dowling

Build Yii 1.* with composer

While we’re looking forward to Yii 2 coming alive, all of the posts on 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 online on integrating composer with yii does not seem particularly straight-forward and misses out on a lot of steps, hence this post. You basically need to have the right folder structure or things will start to break. This guide relies on some of phundaments packages to get things up and running, as the official yii composer project doesn’t work anymore. ...

April 8, 2014 · Shane Dowling

SugarCRM — Add a code-driven column to a list

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 what other shows those performers are also attached to. If it’s typically only one or two shows per event, you can probably make another column in the ListView that displays all shows related to that performer. Lets call this field ‘Other Shows’. ...

April 5, 2014 · Shane Dowling

Yii issues with Homebrew PHP 5.3

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 you’re using the homebrewed installation of PHP. LoadModule php5_module /usr/local/Cellar/php53/5.3.28/libexec/apache2/libphp5.so

April 4, 2014 · Shane Dowling

Owning Your Data — Replacing Gmail

Gmail isn’t secure or private, Google have admitted this. You simply cannot expect privacy from any service that you don’t have control of. Thankfully your email doesn’t have to be tied a mail service like Gmail, Yahoo or Microsoft. You can simply roll your own email server with your own domain name and easily create an (admittedly minimalist) Gmail equivalent. Before you start If you think this guide is too complex, that’s totally understandable. Running your own mail server requires a reasonable amount of technical experience. If you’re interesting in getting away from a service like Gmail and want a good alternative check-out https://mykolab.com/. It costs around 10 bucks a month for 2GB of storage, which isn’t too bad. If you think this isn’t enough space, you could either pay for more or have a mail client like thunderbird offline all non-essential email to your desktop. ...

March 29, 2014 · Shane Dowling

Useful bit of SQL to update many records in SugarCRM

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 );

March 27, 2014 · Shane Dowling

Owning Your Data — Initial Server Setup

So before you can move to your own self-hosted services, you’ll need your own hosting. This is a really basic tutorial/set of links on getting a server up and running with Salt. Hosting Provider DigitalOcean is a terrific hosting company if you’re want to play around with a few personal servers. Here’s the pro’s list. It’s really cost effective. The UI is super basic. They have great tutorials for beginners. How safe is DigitalOcean? Well, this is a call you’ll need to make yourself. They are a New York based hosting company so that’s not so good. However, you can deploy droplets(servers) in Amsterdam which CEO Ben Uretsky stated should make snooping harder. It’s hardly a ringing endorsement. ...

March 6, 2014 · Shane Dowling

Owning Your Data

Governments are collecting data on you, that’s a fairly accepted fact at this stage. Whether you’re being “social”, reading email, playing video games or even when you’re writing a book on the NSA. If you want more details The Guardian has a great explanation as to what Snowden’s files mean here. There’s one critical flaw to the NSA’s methods. Most of how the NSA collects data on you(via prism anyway) is through Google, Yahoo, Gmail, Facebook and Microsoft. These technologies are all just choices you’ve made. Thankfully, choices you can undo. ...

February 27, 2014 · Shane Dowling

Rolling your own mail server with Salt

Recently I decided to migrate my mail server and I took this as an opportunity to better get my head around setting the whole thing up. I’ve used iRedmail in the past but the whole process seemed a little like magic so I took a scouring around the internets for a decent tutorial and came across A Hacker’s Replacement for Gmail and figured it might be worth building up a salt-stack for people. ...

February 16, 2014 · Shane Dowling