As part of the Winter’15 release salesforce introduced the List View API features which helps us to get details and records of list views for an object. I was started exploring more about the List view API and trying to build an use case using that. So I searched about List View in the IdeaExchange site then found that many users are looking for a solution to export records to excel directly from the list view.
I built a solution for that Idea, which helps user to download all the records directly from the List view for both standard and custom object. You don’t have to make any change in the code to use this functionality for different objects. All you need is to create a custom button for that object as mentioned below. Lets take an example for Account object
1. Go to Setup –> Accounts –> Buttons, Links and Actions
2. Click ‘New Button or Link'
3. Enter Label, Name and select display type as ‘List Button’

4. Content source as “Onclick Javascript” and paste the below code
Then include the button in the List view page of the object. Now open any list view of the account object and click the ‘Export to Excel’ button. It will export all records of that list view. Repeat the above steps for creating button for other objects.
Lets see the logic behind the scene, firstly lets take a look into the ListView API. Currently ListView API is available in both SOAP and REST format. Following are the functionalities you can call using REST service. Documentation link
List Views - Get the List of List views for a particular object. Run the following in the workbench to get the result.
Next moving on the code the apex class will call the list view API describe function using HTTP callouts. Then using the JSON parser, parse the JSON string output to get details like SOQL and Columns information. Once we get the SOQL query of the list view then its not a big deal to display the records in a visualforce page. The table in the visualforce page will display the columns dynamically based on the columns in the list view.
1. Go to Setup->Remote Site –> New
2. Add the Name and in the URL enter the domain name of your org
3. Then click save
So now we can able to export records directly from the list view. I have tested this functionality with around 20K records. You can also check my previous article here to exporting more records without hitting view state limit or collection size limits. The complete source code is available here.
You can also deploy to your org by clicking the below button

I built a solution for that Idea, which helps user to download all the records directly from the List view for both standard and custom object. You don’t have to make any change in the code to use this functionality for different objects. All you need is to create a custom button for that object as mentioned below. Lets take an example for Account object
1. Go to Setup –> Accounts –> Buttons, Links and Actions
2. Click ‘New Button or Link'
3. Enter Label, Name and select display type as ‘List Button’

4. Content source as “Onclick Javascript” and paste the below code
Then include the button in the List view page of the object. Now open any list view of the account object and click the ‘Export to Excel’ button. It will export all records of that list view. Repeat the above steps for creating button for other objects.
ListView API in Winter15:
Lets see the logic behind the scene, firstly lets take a look into the ListView API. Currently ListView API is available in both SOAP and REST format. Following are the functionalities you can call using REST service. Documentation link
List Views - Get the List of List views for a particular object. Run the following in the workbench to get the result.
URL - /services/data/v32.0/sobjects/Account/listviewsDescribe - It will provide the definition of particular list view, including SOQL.
URL - /services/data/v32.0/sobjects/Account/listviews/{ListId}/describeResults – It will return the records of the particular list view including column details.
{ListId} – Enter the ID of the List view
URL - /services/data/v32.0/sobjects/Account/listviews/{ListId}/resultsTo know more about the List view API functionality check the "Super ListView viewer" by Andrew Fawcett
{ListId} – Enter the ID of the List view
Next moving on the code the apex class will call the list view API describe function using HTTP callouts. Then using the JSON parser, parse the JSON string output to get details like SOQL and Columns information. Once we get the SOQL query of the list view then its not a big deal to display the records in a visualforce page. The table in the visualforce page will display the columns dynamically based on the columns in the list view.
The reason why I’m not using the results listview API functionality in my code is, the size is default to 25. So we can’t get more than 25 records from the list view using REST API.
Remote Site Setting:
Since we are making HTTP callouts in apex class, we have to setup remote site to call salesforce by itself. Follow the below steps1. Go to Setup->Remote Site –> New
2. Add the Name and in the URL enter the domain name of your org
3. Then click save
So now we can able to export records directly from the list view. I have tested this functionality with around 20K records. You can also check my previous article here to exporting more records without hitting view state limit or collection size limits. The complete source code is available here.
You can also deploy to your org by clicking the below button

the article is nice.most of the important points are there.thankyou for sharing a good one.
ReplyDeleteJMeter Training in Chennai
JMeter Training Institute in Chennai
JMeter Certification
Appium Training in Chennai
Best Appium Training institute in Chennai
Appium Training in Anna Nagar
JMeter Training in Chennai
JMeter Training
IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.
DeleteJavaScript Online Training in India
JavaScript Training in India
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
Very helpful article, Thank you for posting.
ReplyDeleteI have a question, Is there any possible way to update List View describe result using httpreq or metadata api.
This comment has been removed by the author.
ReplyDelete
ReplyDeleteExcellent and very cool idea and great content of different kinds of valuable information's. Thanks for sharing such a marvelous post with us and keep blogging...
Corporate Training in Chennai
Corporate Training
Power BI Training in Chennai
Unix Training in Chennai
Linux Training in Chennai
Pega Training in Chennai
Oracle DBA Training in Chennai
job Openings in chennai
Corporate Training in Porur
Corporate Training in T Nagar
Excellent Blog. Thank you so much for sharing.
ReplyDeletebest react js training in Chennai
react js training in Chennai
react js workshop in Chennai
react js courses in Chennai
react js training institute in Chennai
reactjs training Chennai
react js online training
react js online training india
react js course content
react js training courses
react js course syllabus
react js training
react js certification in chennai
best react js training
Nice post...Thanks for sharing.
ReplyDeletePython training in Chennai
Python training in OMR
Python training in Velachery
Python certification training in Chennai
Python training fees in Chennai
Python training with placement in Chennai
Python training in Chennai with Placement
Python course in Chennai
Python Certification course in Chennai
Python online training in Chennai
Python training in Chennai Quora
Best Python Training in Chennai
Best Python training in OMR
Best Python training in Velachery
Best Python course in Chennai
Thanks for sharing valuable information.
ReplyDeleteDigital Marketing training Course in chennai
digital marketing training institute in chennai
digital marketing training in Chennai
digital marketing course in Chennai
digital marketing course training in omr
digital marketing certification in omr
digital marketing course training in velachery
digital marketing training center in chennai
digital marketing courses with placement in chennai
digital marketing certification in chennai
digital marketing institute in Chennai
digital marketing certification course in Chennai
digital marketing course training in Chennai
Digital Marketing course in Chennai with placement
digital marketing courses in chennai
I have been reading for the past two days about your blogs and topics, still on fetching! Wondering about your words on each line was massively effective. Techno-based information has been fetched in each of your topics. Sure it will enhance and fill the queries of the public needs. Feeling so glad about your article. Thanks…!
ReplyDeleteselenium training in chennai
selenium online courses best selenium online training
selenium testing training
selenium classes
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteWeb Designing Training Institute in Chennai | web design training class in chennai | web designing course in chennai with placement | Web Designing and Development Course in Chennai | Web Designer Training Course in Chennai
Mobile Application Development Courses in chennai
Data Science Training in Chennai | Data Science courses in Chennai
Professional packers and movers in chennai | PDY Packers | Household Goods Shifting
Web Designing Training Institute in Chennai | Web Designing courses in Chennai
Google ads services | Google Ads Management agency
Web Designing Course in Chennai | Web Designing Training in Chennai
This is such an informative post. Online converters are also pretty good at it's job. I would like to share one I've found here
ReplyDeleteThank you for excellent article.Great information for new guy like antimalware service executable
ReplyDeleteI'm positive you might be like me, you may have additionally noticed many images displayed which have been taken by a mess of photographers, all with numerous imagery of what they prefer to take photos of. All hoping it's going to attraction to you so you'll take it house and place their creation in your wall to exhibit to others. If you want to learn more about this topic, then please visit here
ReplyDeleteI really enjoyed while reading your article and it is good to know the latest updates. Do post more.
ReplyDeleteSalesforce Training in Chennai
salesforce developer training in chennai
salesforce certification in chennai
Angular 5 Training in Chennai
ccna course in Chennai
ReactJS Training in Chennai
Tally Training in Chennai
Salesforce Training in Anna Nagar
Salesforce Training in Tambaram
Salesforce Training in Velachery
Earlier than discussing the differing kinds of applications in addition to what they provide and to whom, it might be finest to begin with a primer on picture graphics and format. If you want to learn more about this topic please visit https://onlineconvertfree.com
ReplyDeleteNice post.it is really interesting to read this article...Find latest Sarkari Job for freshers & experienced graduates across India & get free Naukri/Job alerts on recent & upcoming Sarkari jobs vacancies through Sarkari Job, as a jobs source we provides present and latest recruitment details for all Government/Sarkari Naukri across India.
ReplyDeletevaluable blog thanks for sharing it...waiting for next update...
ReplyDeleteMobile Testing Training in Chennai
Mobile Application Testing Training in Chennai
Mobile Appium Training in chennai
Mobile Testing Training in Anna Nagar
Mobile Testing Training in T Nagar
Manual Testing Training in Chennai
LoadRunner Training in Chennai
Photoshop Classes in Chennai
Spring Training in Chennai
QTP Training in Chennai
awesome article,the content has very informative ideas, waiting for the next update...
ReplyDeletecore java training in chennai
Best core java Training in Chennai
core java course
core java training in Velachery
core java training in Tambaram
C C++ Training in Chennai
javascript training in chennai
Hibernate Training in Chennai
It's very useful article with inforamtive and insightful content and i had good experience with this information. We, at the CRS info solutions ,help candidates in acquiring certificates, master interview questions, and prepare brilliant resumes.Go through some helpful and rich content Salesforce Admin syllabus from learn in real time team. This Salesforce Development syllabus is 100% practical and highly worth reading. Recently i have gone through Salesforce Development syllabus and Salesforce Admin syllabus which includes Salesforce training in USA so practically designed.
ReplyDeleteexpost records first view thanks for sharing this page..i really need some more details..
ReplyDeleteAngularJS training in chennai | AngularJS training in anna nagar | AngularJS training in omr | AngularJS training in porur | AngularJS training in tambaram | AngularJS training in velachery
Great Article
ReplyDeleteFinal Year Projects in Python
Python Training in Chennai
FInal Year Project Centers in Chennai
Python Training in Chennai
Never too late to start learning at Salesforce Training in Australia even though you don't have any programming knowledge you can excell in Salesforce Training in London United Kingdom (UK) because it is all about your customers, so this time find the best Salesforce Training in Europe. This way we will learn Salesforce CRM.
ReplyDeleteMyself so glad to establish your blog entry since it's actually quite instructive. If it's not too much trouble continue composing this sort of web journal and I normally visit this blog. Examine my administrations.
ReplyDeleteRead these Salesforce Admin Certification Topics which are really helpful. I read these Salesforce Admin and Developer Certification Dumps and very much useful for me.
Great Article
ReplyDeleteArtificial Intelligence Projects
Project Center in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
I am so happy to found your blog post because it's really very informative. Please keep writing this kind of blogs and I regularly visit this blog. Have a look at my services.
ReplyDeleteThis is really the best Top 20 Salesforce CRM Admin Development Interview Questions highly helpful. I have found these Scenario based Salesforce developers interview questions and answers very helpful to attempt job interviews. Wow, i got this scenario based Salesforce interview questions highly helpful.
Thanks a lot for sharing a great blog I was just browsing through the internet looking for some information and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject. Bookmarked this page, will come back for more keep going on it helped me a lot I have gained a lot of knowledge by reading your blog.
ReplyDeleteOracle Apex Training
apex oracle training
oracle apex training online
oracle apex courses online
Oracle APEX 19.1 Training
oracle apex 18 training
oracle apex 5 training