Monthly Archives: October 2012

Apex Method of the Day – New Map from SObject List

List<SObject> lst; … Map<ID, SObject> mp = new Map<ID, SObject>(lst); Force.com Apex Code Developer’s Guide – Maps from SObject Arrays Original Tweet

Posted in Documentation | Tagged , , | Leave a comment

Apex Method of the Day – addFields

public class MyControllerExtn { public MyControllerExtn(ApexPages.StandardController c) { // include fields not referenced on the Visualforce page c.addFields(new List<String>{‘Foo__c’,’Bar__c’,’Force__c’}); } } Force.com Apex Code Developer’s Guide – StandardController Class Original Tweet

Posted in Documentation | Tagged , , | Leave a comment