Tag Archives: apex

Debugging SOAP Callouts

For years I thought the only way to view the raw XML of a SOAP request from Salesforce was to view the debug log in a Developer Edition org. Two problems: Sometimes it’s a hassle to get your code and … Continue reading

Tagged , , , , , | 1 Comment

Published on the Appirio Tech Blog

My first article was posted to the Appirio Tech Blog: Considerations Using SObjects in Sets and Map Keys in Apex.

Tagged , , , | Comments Off

Using the Salesforce JSON Generator for quick visualforce translations

Asychronous Javascript (Aj of Ajax)) on Salesforce is easy. Salesforce does a great job of making it simple to have a way on a visualforce page to have an apex class do some processing and return the result to the … Continue reading

Tagged , , , | Comments Off

parse vs valueOf for Date in Apex

If you look at the static method prototypes for Date.parse and Date.valueOf for apex, each accepts a String and each returns a new Date instance. You have to read the example in the description to know the difference — in … Continue reading

Tagged , , | 4 Comments

Apex Inline List and Map Definition

I’m making this post because, frankly, I always forget the syntax. There’s a long-form way to define a List or String in apex, and there’s also an equivalent short-form way to define a List or String variable inline. Here’s the … Continue reading

Tagged , , | Comments Off

Outputting a null string with Apex

What would you expect a null String to convert to output? It makes sense if null was output as ”, or a blank String, right? Unfortunately it actually outputs as ‘null’. Ridiculous, right? System.debug((String)null); 10:32:58.032|USER_DEBUG|[1]|DEBUG|null Consider this dumb utility function … Continue reading

Tagged , | 1 Comment