Author Archives: Stephen

A Tale of Two Platforms

It will be 10 years ago next month that I wrote my first line of Apex code. Visualforce was in beta (though not yet packageable), the only valid use of the “extends” keyword in Apex was for custom exceptions, and … Continue reading

Posted in News, Patterns | Tagged , , , , , , | Leave a comment

Batch Apex Query Behaviour

How fresh is your batch? When running a Batch Apex job which implements Database.Batchable<sObject>, you specify a query in the start method (in which you can select up to 50M records) and define an activity to be performed based on these records in … Continue reading

Posted in Documentation | Tagged | Leave a comment

FlexQueue and the Evolution of Asynchronous Apex

Governor Grappling Sooner or later (okay, sooner rather than later) when working in Apex we will need to grapple with Apex Governor Limits Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces limits to ensure that runaway … Continue reading

Posted in Documentation | Tagged , , | Leave a comment

Q&A with AMsource Technology

Reblog: AMsource Technology Q&A WITH STEPHEN WILLCOCK OF FINANCIALFORCE.COM Monday 27th April 2015 We talked with Stephen Willcock from our client, and had the opportunity to discuss a number of subjects such as his role as Director of Product Innovation, what … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Apex Method of the Day – JSON.serialize(Object)

Sometimes using JSON.serialize on a custom Apex type does not provide sufficient control over how the JSON is serialized. For example, serializing an Apex type will include null values for all fields that haven’t been set, when you might prefer … Continue reading

Posted in Documentation | Tagged , | Leave a comment

One controller to rule them all…

I recently wanted to create an extension controller for a custom object which I could use with both single records and a set of records. In other words, a list and detail controller extension, with actions that could be applied to one or many records. I … Continue reading

Posted in Patterns | Tagged , , , | 1 Comment

IP Address Ranges when Logging in to Salesforce

Salesforce user security. Its great. As well as being one of the things customers value highly, its a massive advantage for application developers to be building upon a trusted platform with robust and well considered security features. Restricting logins to specific IP addresses or ranges of addresses … Continue reading

Posted in Documentation | Tagged , | 7 Comments

Apex Method of the Day – String.format(String value, List<String> args)

The above is an example of simple token replacement and is equivalent to: Why bother? Well, for more complex strings use of String.format can be easier to write and maintain than concatenation, but a great benefit comes from its combination … Continue reading

Posted in Documentation | Tagged , | Leave a comment

Constructive Forces at Work

A constructor in Apex is called when an instance of a class is created. Code-wise constructors might look like member methods, but they differ in a couple of significant ways. First, constructors can’t be called any other time than when … Continue reading

Posted in Documentation | Tagged | Leave a comment

Dynamic Field Sets

One of the things I love about is how easy it can be to stitch together blocks of functionality provided in the platform, saving you development effort. Spending a little extra time working out how to best use platform … Continue reading

Posted in Tutorials | Tagged , , , | 1 Comment