Category Archives: Documentation

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

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

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 , | 6 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

Apex Method of the Day – String.isEmpty(String myString)

Rather than: Force.com Apex Code Developer’s Guide – String Methods

Posted in Documentation | Tagged , | 1 Comment