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

Sforce Error



I am using the getSelected() function from the standard controller in a apex class and it breaks when a annual revenve filter is inserted for eg: 70000000 which is automatically converted to 7.0E7


The error I get is:


Account WHERE ((AnnualRevenue < 7.0E7)) ORDER BY Name ASC LIMIT 10000 ^ ERROR at Row:1:Column:51 unexpected token: E7


I am not sure how to fix this as the error is returned by a internal function. No help in debug logs and no error email either.


Any help would be greatly appreciated.



Will putting the value into an Integer variable help matters (as opposed to hard coding the value)?



Integer i = 70000000;

List<Account> accounts = [SELECT id FROM Account WHERE (( AnnualRevenue < :i )) ORDER BY...]


It may be a shot in the dark as I am unfamiliar with your implementation, but may be worth a try.


Thanks Justin


Since I am using the standard controller something like this:


selectedAccounts = (List<Account>) stdCtrller.getSelected();


I really don’t have any control over the query that is being executed. Maybe one of the Salesforce Engineers can give some input on this as I have no idea how I can change the query run by the getSelected method.