Salesforce

Salesforce

Links for Unit Testing in Salesforce

Unit testing: http://wiki.developerforce.com/page/An_Introduction_to_Apex_Code_Test_Methods http://wiki.developerforce.com/page/How_to_Write_Good_Unit_Tests http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_unit_tests.htm Testing Controllers and extensions: http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_error_handling.htm Running Unit Test Methods: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_unit_tests_running.htm Cheers!!!

Salesforce

How to get a subquery field value using Apex?

List<Account> acct = new List<Account>(); String sql = 'SELECT Name,Phone,External_ID__c,Type,Industry,AccountNumber,Description,FAX,SLA__c,Rating,(SELECT Name,StageName,CloseDate,Probability FROM Opportunities) FROM Account WHERE ID=:localId'; acct = Database.Query(sql);                 for(Account ac:acct)         {             List<Opportunity> opptys = ....