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
Prakash Badugu 8Prakash Badugu 8 

listview with out standard or custom objects?

Hello Everyone,

I think except for standard and custom objects we can not reuse the salesforce listview component. i have some set of records from a web service call which i have to show in a listview. Since not to miss the salesforce listview with pagination and other features, i have planned to use listview of salesforce with standardsetcontroller. But unfortunately sales force can show only the data of existing standard and custom objects only. What if the data is temporary and just required to be shown  to the user, where he can make his selections and then proceed. To do this do i need to create a listview using all the visualforce coding, handling the pagination. can not i use the salesforce listview to show data with out custom or standard objects?


James LoghryJames Loghry

Correct, the standardsetcontroller and listviews in Salesforce work solely with custom objects and standard objects within Salesforce.  They cannot operate over Apex classes or XML or JSON or anything else.  Part of this is due to stuff like using SOQL queries and "queryMore" under the hood of Salesforce to handle pagination and filtering.  If you want to create a listview of your own, you're going to have to either write those webservice objects into Salesforce records, or implement your own view in Visualforce, perhaps using a pageblocktable and remote action calls.

- James
Prakash Badugu 8Prakash Badugu 8
Thanks for your reply James !! Writing temporary data which user do not need in to the Salesforce records should not be a good idea as per my thinking, because user would be selecting the data required and then insert them in to the salesforce records in my use case. Correct me James if i am wrong. And about the creation my own list view in visualforce -- i do not want to miss the sales force look and feel. I think Salesforce should have provided this facility for the use cases like mine. And i feel this is a regular use case where applications need.

Please advice.

James LoghryJames Loghry


There is something called "oData" that is being piloted currently.  It's not generally available.  However, the gist is if you're external system supported the same protocol, then you can bring in external data for display in reports / listviews, etc.  That may or may not work for you, though.  It sounds through like you're stuck with a custom integration of pumping your objects into salesforce, or writing a custom visualforce page for making a callout to your external system and displaying a customized listview.