You need to sign in to do that
Don't have an account?
function readOnly(count){ }
Apex Code Development (90768)
General Development (55146)
Visualforce Development (37251)
Lightning (18265)
APIs and Integration (17146)
Trailhead (11680)
Formulas & Validation Rules Discussion (11337)
Other Salesforce Applications (8116)
Jobs Board (6655)
Force.com Sites & Site.com (4842)
Mobile (2694)
You need to sign in to do that
Don't have an account?
The error is caused by time out of an non-selective SOQL Query.
To prevent SOQL Query time outs, make sure to use selective criteria, for the above example, instead of using the does NOT equal True, use
Closed Equals Boolean False
Using "Equals" instead of "Does not equal", will be a selective query, and in this way it would not time out.
Please check below articles for more information
https://help.salesforce.com/s/articleView?id=000383910&type=1 (https://help.salesforce.com/s/articleView?id=000383910&type=1)
https://developer.salesforce.com/blogs/engineering/2013/07/maximizing-the-performance-of-force-com-soql-reports-and-list-views
If this information helps, please mark the answer as best. Thank you