APEX code for SalesForce.com