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
SRIADISRIADI 

Problem with AggregateResult

I am using AggregateResult for an SOQL query and passing the list of database result set to another static method in second class. There I am looping the AggregateResult list using for Loop. This is working fine in one sandbox but giving save error in another sandbox. It is saying "Save error: Invalid type: AggregateResult" while saving in another sandbox.

 

Please help in fixing this Save Error.

Best Answer chosen by Admin (Salesforce Developers) 
SeAlVaSeAlVa

Make sure that the API version of the code for both environments are the same.

 

Regards

All Answers

SeAlVaSeAlVa

Make sure that the API version of the code for both environments are the same.

 

Regards

This was selected as the best answer
steve456steve456

Also check the Api names

SRIADISRIADI

 

Thank You, it resolved my problem.