You need to sign in to do that
Don't have an account?
etechcareers
expecting a left angle bracket, found 'queryResults' ????
Hi:
Does anyone know what is wrong with my statement:
public class Productff { //Define your variables public class OppStageHolder { public String OPP {get; set;} public Integer TTL_Opp {get; set;} //Empty Array public OppStageHolder (){} } //Results will be placed within this List public List queryResults {get;set;} //Your Page public PageReference TTL() { AggregateResult[] groupedResults = [SELECT Product_Name__c, Sum(TotalPrice) ce FROM OpportunityLineItem GROUP BY Product_Name__c]; System.Debug('zzavg ' + groupedResults.size()); //Define your List queryResults = new List(); for (AggregateResult ard : groupedResults) { OppStageHolder myObject = new OppStageHolder(); myObject.OPP = String.valueOf(ard.get('Product_Name__c')); myObject.TTL_Opp = (Integer) ard.get('ce'); queryResults.add(myObject); } return Page.TTL; } }
The compiler needs to know what type of data you will put in your list. Looking at your code, it appears to be your custom class:
All Answers
The compiler needs to know what type of data you will put in your list. Looking at your code, it appears to be your custom class:
Thank you that was a silly mistake hehehe