You need to sign in to do that
Don't have an account?
Vaibhav Shetti
What is the best way to get ListViews and related filters?
I need to fetch ListViews and related filters, say for Account object. I know StandardSetContoller has methods - getListViewOptions() and getFilterId() methods which are helpful. However, the maximum record limit for StandardSetController is 10,000 records. In my case there are records more than 10,000. How do I implement this so that I can handle records more than 10,000?
I think you will have to use the REST API to access the SOQL behind a list view and build our own UI.
Here is an Apex Class - https://github.com/shrutis22/Record-Lookup/blob/master/src/classes/ListViewAPI.cls that I used a long ago to accomplish this.
Using the Apex Class + REST API, you can get the SOQL query behind the LIST VIEW. You can then use OFFSET and LIMIT to show more records.
All Answers
I think you will have to use the REST API to access the SOQL behind a list view and build our own UI.
Here is an Apex Class - https://github.com/shrutis22/Record-Lookup/blob/master/src/classes/ListViewAPI.cls that I used a long ago to accomplish this.
Using the Apex Class + REST API, you can get the SOQL query behind the LIST VIEW. You can then use OFFSET and LIMIT to show more records.
Wlile I am trying to access the apex written by Shruti either from Visualforce or from LWC Component I am getting unauthorized Access to end point.
Error Details:
16:30:16.0 (62355232)|CALLOUT_RESPONSE|[83]|System.HttpResponse[Status=Unauthorized, StatusCode=401] 16:30:16.0 (62462969)|
6:30:16.0 (64473927)|FATAL_ERROR|System.JSONException: Malformed JSON: Expected '{' at the beginning of object
Any help would be highly appeciated.