Abstract away which async framework is being used within Salesforce in favor of dynamically using the most appropriate solution for the problem at hand.
MIT License
34
stars
3
forks
source link
Issue encountered with Database.countQuery() and ORDER BY filter #2
An exception will occur in the AsyncProcessor class at line 94 when retrieving the record count using Database.countQuery if the query includes an "ORDER BY" expression. The exception message will read as follows: "System.UnexpectedException: COUNT() and ORDER BY may not be used together."
Could you please review the code snippet below and share your thoughts on whether this is an effective way to resolve the issue?
An exception will occur in the AsyncProcessor class at line 94 when retrieving the record count using Database.countQuery if the query includes an "ORDER BY" expression. The exception message will read as follows: "System.UnexpectedException: COUNT() and ORDER BY may not be used together."
Could you please review the code snippet below and share your thoughts on whether this is an effective way to resolve the issue?