You need to sign in to do that
Don't have an account?
MMA_FORCE
Why can't certain fields be grouped in a Query Call????
I have an aggregate query and it appears that it does not like my query in visualforce but apex controller accepts it..
The error I get on my VF page is:
field 'Term__c' can not be grouped in a query call
My Query is:
AggregateResult[] groupedResultsD = [SELECT SARQ__r.Subject__c,NLNS__SARQ__r.Term__c, SUM(Credits_Earned__c) ce,SUM(SARQ__r.Min_Pass__c)minpass FROM Course__c Where Student__c = :students[0].Student__c GROUP BY SARQ__r.Subject__c,SARQ__r.Term__c];
Term__c is a formula field in my Object....
Thanks
In your case it can be by two possible causes: fields "__r" or fields "groupable= false".
Check this entry for details: "Considerations when use Group By"
Regards!
There is limitation Like Formula fileds can't use in group by Clause .