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
SmileonlSmileonl 

SUM() Error...

 

Hi, I have an error when trying to use SUM() in a query. 
Request:
SELECT SUM(Amount) FROM Opportunity
 
Error:
Warning (2) - Invalid argument supplied for foreach() in /var/www/dev.local/system/libraries/salesforce/SforcePartnerClient.php on line 344

 

LakshmanLakshman

yes aggregate functions are not supported by php API. You can either create a roll-up summary field which will give you sum of necessary field or use other API like RestAPI.