Tag Archives: Apex Method of the Day

Apex Method of the Day – List Iterator

Example: Force.com Apex Code Developer’s Guide – List Methods Force.com Apex Code Developer’s Guide – Custom Iterators Original Tweet

Posted in Documentation | Tagged , | Leave a comment

Apex Method of the Day – JSON.deserialize(jsonString, List.class)

List<Foo> f = (List<Foo>) JSON.deserialize(jsonString, List<Foo>.class); Force.com Apex Code Developer’s Guide – JSON Methods Original Tweet

Posted in Documentation | Tagged , , | 1 Comment

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