A Gotcha With Standard Controllers

It's not that often I find myself running into issues with the more established parts of the Salesforce.com platform these days, but it does happen. As I've written in the past I'm a big believer in using built-in functionality wherever possible rather than reinventing the wheel. Visualforce by itself…

User Locales and the Start of the Week

You've probably noticed that user records have a locale field in Salesforce, and chances are you've changed it at some stage to match your locale because you got sick of seeing dates in the wrong format. You might know that the locale also affects the default currency as well as…

Keeping It Clean: Easy Conditional Where Clause

First things first, a disclaimer: this is clearly not the most efficient way of doing this in terms of the query execution, however, it is a nice way to keep your code neat and compact whilst negating the need for dynamic SOQL. Dynamic SOQL is a fantastic tool, but it's…

Aggregate SOQL, Handy Stuff

As most people are aware, one of the big features included in the API 18.0 release for Salesforce was aggregate functions for SOQL queries. Essentially these boil down to those functions that most people are used to having in SQL, i.e. you can do things like count a…