function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kcostekcoste 

MALFORMED QUERY - Aggregate query not allowed with this Api version

I'm running eclipse 3.4.2. When I open the Schema Browser and try to run this simple aggregate query:

 

SELECT FirstName, LastName FROM Contact GROUP BY FirstName, LastName

 

I get the error "MALFORMED QUERY - Aggregate query not allowed with this Api version".

 

When I create a new Apex Class, I can only select version 16.0.

 

How can I use the latest Api (18.0), so that I can use aggregates?

 

Thanks,

--Ken

Kenji775Kenji775
What ive done is create the empty shell of the trigger/class in salesforce web, and change the API version to 18. then download it using eclipse. That seems to do the trick. Hope this helps.
rscottrscott
you can also open up the meta.xml file in eclipse and change the api version in there.
Kenji775Kenji775
I suspected you might be able to do that, but I never had much luck editing the xml files. Back in the day that was how you had to deactivate triggers and such, and was very hit and miss. But yeah, that should work to, I think.
kcostekcoste

For triggers and classes, both suggestions look like acceptible workarounds.

 

The thing that's frustrating me is that when I right-click "salesforce.schema" and select Open with -> Schema Browser, it won't allow version 18.0 features (aggregates, etc).

 

I typically flesh out queries that way before pasting them into code.

 

Is there a setting in eclipse that says what Api version to allow in the Schema Browser?

 

Thanks,

--Ken

rscottrscott
As far as I know, there is no setting to change what API versions the IDE can use. We are stuck waiting for the new 3.5 IDE or a new Apex Explorer version. The only place I've had success running queries with the new features outside of code is in the UI's System Log > Execute Apex section. Not quite as easy as the other places, but it is something.
kcostekcoste

I guess that'll work for now.

 

Thanks,

--Ken