Tag Archives: apex

Apex: Booleans can be null

Apex on Salesforce is a subset of Java. In general a Java developer should feel right at home when creating Apex. One of the things I encountered recently where Java and Apex differ is the ability to access Primitives. For … Continue reading

Tagged | Comments Off

Endpoint for Salesforce custom SOAP web service

It was surprising difficult to figure out what the endpoint should be for a custom SOAP web service created on Salesforce, probably due to the generic terms used. When you create a custom soap web service in Salesforce, e.g. and … Continue reading

Tagged , , , | Comments Off

Apex Pattern: Save and Open PDF from button

I’ve heard variations to this request a few times now: Can we have a button on the {object} where we generate a PDF, save it as an attachment on the {object} record, and open it? Saving a PDF is so … Continue reading

Tagged , , , | Comments Off

Best Practice: Related Fields with Standard Controller Extensions

So you want to build a StandardController extension, and you’re considering using the StandardController.getRecord() method to get the record supplied by the Standard Controller. The problem is, it doesn’t pull in each of the fields you need to use, right? … Continue reading

Tagged , , , | Comments Off

Clone a Quote Line Item with an Apex Controller

Jasper asked: I’m in need of a custom clone button to clone single QuoteLineItems [with URL hacking]. I followed up with Jasper privately in email, committing to helping him. He confirmed in email that the following solution worked for him, … Continue reading

Tagged , , , | 3 Comments

Apex: convert from List to Set and vice versa

I can’t tell you how many times I have a method which has a Set as its parameter, and I’m working with a List, or vice versa. Of course, fundamentally the difference between Set and List is that Set is … Continue reading

Tagged , | Comments Off