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

Too many query rows - 50001.-Even after having 'LIMIT' in the SOQL
I have an aggregate function in my class
Public List<AggregateResult> getGroupedResults() {
return [SELECT SUM(MTD_Revenue_Combined__c)Total, Owner.ManagerId FROM Account WHERE Owner.ManagerId = '00500000006pSSm' AND MTD_Revenue_Combined__c != 0.00 GROUP BY Owner.ManagerId LIMIT 50000];
}
IT still throws the 50000 Limit error. Any ideas would be helpful. Thanks!
Public List<AggregateResult> getGroupedResults() {
return [SELECT SUM(MTD_Revenue_Combined__c)Total, Owner.ManagerId FROM Account WHERE Owner.ManagerId = '00500000006pSSm' AND MTD_Revenue_Combined__c != 0.00 GROUP BY Owner.ManagerId LIMIT 50000];
}
IT still throws the 50000 Limit error. Any ideas would be helpful. Thanks!
See this..
This will help you