I have a VF page that allows a user to perform dynamic searching in filter on an object.
The user can easily specify a query that will result in more than 50,000 records. I would like to catch this error and prompt the user to narrow their search but unfortunately Salesforce doesn't let you catch Limit Exceptions.
Are their any good solutions for this? I suppose I could make the call with a remote function and error handle with JS, but my querying class is very object oriented so rebuilding everything for a static method is not really ideal.