-
Apex: Converting Lists to Sets, and Sets To Lists
As many Salesforce Apex programmers know, in Salesforce it’s pretty much an unchallenged best practice that all code should be able to handle bulk inserts, updates, etc. When adhering to this best practice, it’s really common to use sets, or lists as parameters in functions. Sometimes, there’s a need to convert between lists, or sets, […]
-
Apex How to Get a List of Fields Set on an sObject
I recently had a requirement to dynamically determine what fields had been set or queried on a sObject, so that a comparison could be done on what was actually stored in Salesforce’s Datastore. Surprisingly, there’s no way method on the sObject that let’s you tell what’s actually been queried or set. So without further ado, […]