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
Subhranshu MohantySubhranshu Mohanty 

Displaying records In salesforce1

Hi All,
I want to create a page where i can display records like listview manner in salesforce1,my concern is how manu records can we display on that mobile visualforce page , if i have more than 2000 or even more how i will going to handle for that mobile specific page.

Any idea & answers !!!!!
 
Best Answer chosen by Subhranshu Mohanty
KaranrajKaranraj
I have used 'Visualforce Remote Object' concept in that example page. Retrieve method in Visualforce remote object will support only 100 records in a single request, if you want to fetch more rows, submit additional requests by using the OFFSET query parameter.Note that the maximum offset allowed is 2,000. Check this link for using offset in visualforce remote object http://peterknolle.com/infinite-scroll-with-visualforce-remote-objects/ You can also use Javascript remoting concept to retrieve the record from controller class and get the result in javascript. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_example.htm




 

All Answers

KaranrajKaranraj
Subhranshu - You can display more records, if you are not using any visualforce tag then there is problem because view state limit is only applicable for visualforce tag. For responsive design you will be using more html and jquery/mobile elements, if you are going to display all the records in one page (more than 2000 records), then surely it will be difficult for the user to scroll and view all the records in a mobile screen.

You can't display all information because of mobile screen size, so have to design in a way that page should be more user friendly. Try to display less record because its difficult to scroll down to view all the record and also it wont affect your page load time, have search functioanlity in your page or scroll events to get the records when the user want to view. Keep your page as simple as you can.

Check this salesforce mobile template for list view - https://developer.salesforce.com/mobile/services/mobile-templates
You can use the jQuery mobile list view - https://api.jquerymobile.com/listview/ 

Thanks,
Karanraj (http://www.karanrajs.com)

 
Subhranshu MohantySubhranshu Mohanty
Karan 

Thanks!! for your valueble information,

So i can query more records , but i need to display in a chunck wise manner(pagination).

I have seen your blog http://clicksandcode.blogspot.in/2014/08/visualforce-remote-object-im-single.html .

The page in which you limited it to 100, can we rise this in order to contain more no of records.
 
KaranrajKaranraj
I have used 'Visualforce Remote Object' concept in that example page. Retrieve method in Visualforce remote object will support only 100 records in a single request, if you want to fetch more rows, submit additional requests by using the OFFSET query parameter.Note that the maximum offset allowed is 2,000. Check this link for using offset in visualforce remote object http://peterknolle.com/infinite-scroll-with-visualforce-remote-objects/ You can also use Javascript remoting concept to retrieve the record from controller class and get the result in javascript. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_js_remoting_example.htm




 
This was selected as the best answer