Posts tagged apex
Dependent picklists in Salesforce
Mar 23rd
Virtually every site I’ve worked with in recent years has had need for dependent drop downs of some nature.
Usually implementing a dependent drop down consists one of two options: Outputting every option into a JavaScript method, or invoking an Ajax call to get the next set of options. The disadvantage to both of these options is usually a bulky mechanism the developer must write in order to provide a simple UI component.
Salesforce provides a dependent picklist feature, which in keeping with their no-software mantra, eliminates any need for a custom ajax or javascript solution. Define a dependent picklist and reference it in your page layout or Visualforce page. Salesforce takes care of everything else under the covers.
Template for Global Configuration Variables in Apex
Nov 26th

Richard Vanhook
Summary: This article discusses a pattern or template for enabling and customizing features in an application developed upon the Force.com platform.
Force.com and “configurability”: new expecations for developers
A great thing about developing on the Force.com platform is how configurable the product is out of the box. Need a new field on a screen? Easy, find the right page layout and modify it. Want a field to be required? Go find the field and make it required. It’s crazy easy. So easy in fact, that more and more folks can contribute to the solution of a system. Even folks without an IT background that 5-10 years ago would never make these types of configuration changes are doing it. Can you imagine Joe the BA adding an Oracle constraint to make a field required? Of course not.
The downside to this amazing “configurability” of the Force.com platform however, is it creates a disconnect between developers who are not used to including this level of configurability, and salesforce users who have grown to love this type of configuration and now expect it in anything associated with salesforce. Below I discuss a “global configuration variable” pattern that makes adding configurability to your solution simple, clean and reliable.
