function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jtjaardjtjaard 

Apex syntax/compiler issue


Hi,

I'm getting an unspecified compiler error with this code. I'm not really sure why it won't compile, any suggestions? Main error I see is: in class SalesReport at line -1 column -1

Code:
global class SalesReport {
        webservice static opportunity[] getAllOpportunities()
        {
         List<opportunity> opportunityList = new List<opportunity>();
         for (opportunity opp: [Select o.Amount, o.product__c, o.product__r.product_Condition__c, o.product_Condition__c, o.product_Marina__c, o.product_Model_Year__c, o.CloseDate, o.List_Price__c, o.CreatedDate, o.ExpectedRevenue,o.Id,o.LeadSource, o.Name, o.NextStep, o.OwnerId, o.Probability, o.StageName from Opportunity o limit 10])
          {
              opp.List_price__c = [select List_Price__c from Listing_Details__c where Listing_Details__c.product__c = :opp.product__c].List_price__c;
            
              opportunityList.add(opp);
          }
         
          return opportunityList;
        }
        static testmethod void testGetAllProducts()
        {
         List<opportunity> opp = getAllOpportunities();
         System.assertequals(10, opp.size());
        }
}

 




Message Edited by jtjaard on 01-04-2008 04:59 PM