0

I have come to know that a few fields in Salesforce.com are not groupable and that we can make sure whether field is group-able or not with getDescribeSObject.

I would like to know what are the consideration for determining whether field is group-able or not.

0

1 Answer 1

2

The documentation on DescribeFieldResult is pretty clear. If this method returns true, you can use it in a GROUP BY clause.

isGroupable()

Returns true if the field can be included in the GROUP BY clause of a SOQL query, false otherwise. This method is only available for Apex classes and triggers saved using API version 18.0 and higher.

I have to dig for better documentation, but I know specifically that formula fields as well as boolean and rich text fields are not groupable.

3
  • Thanks for reply. Do salesforce randomly assigns isgroupable to fields or any according to fieldtype(like Number etc)
    – Arun SFDC
    Commented Jan 14, 2016 at 5:57
  • Is your question about why certain fields are groupable and others are not?
    – Adrian Larson
    Commented Jan 14, 2016 at 5:58
  • Yes. My question is about why certain fields are groupable and others are not?
    – Arun SFDC
    Commented Jan 14, 2016 at 10:22

Not the answer you're looking for? Browse other questions tagged .