You need to sign in to do that
Don't have an account?
VIGNESH BALASUBRAMANIAN
Cannot group by a currency field in SOQL
Hi Everyone,
I could not group by a currency field in SOQL,
field 'currency__c' can not be grouped in a query call
Kindly provide me a solution,
Thanks
Vignesh
I could not group by a currency field in SOQL,
Select count(id),currency__c from contact group by currency__cIt shows the following error,
field 'currency__c' can not be grouped in a query call
Kindly provide me a solution,
Thanks
Vignesh
Not all the fields are groupable in SOQL.
I believe Currency type field is certainly not one of them.
You can run this code to get the detailed description on your field. You will be seeing a boolean attribute isGroupable is set to false in this case.
If your use case for grouping the data by currency__c field is unavoidable, I suggest you to use an additional field which will store the value in currency__c field in TEXT type and use that in GROUP BY.
I am afraid this is the only way around here.
Let me know if this helps.