You need to sign in to do that
Don't have an account?

Getting undefined error in javascript vidualforce page..
here i am integrating google charts apart from this i am using AggregateResult funtion here i have sum of the annual annual revenue and grouping the rating but here the problem is i have displayed sum of annual revenue but i am not able to display the labels of Ratig field(Hot,Warm,Cold,Others) how can i get this can anybody help me and this is my code.
result = sforce.connection.query("Select Rating, sum(Annualrevenue) sales " + "from Account group by Rating " );
// Iterate over the result
var it = new sforce.QueryResultIterator(result);
while(it.hasNext()) {
var record = it.next();
alert(record.rating);
// Add the data to the table
data.addRow([record.rating, {v:parseFloat(record.sales), f: formatCurrencyLabel(record.sales)}]);
}
when ever i test this using record.rating it shows undefiened, value if i display record.sales it show the value of sales.... how can i get rating values anybody help me please.............?
All Answers