Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How can I fetch the list views columns in Salesforce?

    Tagged: List View, List View Column, Metadata API, Salesforce Apex, Salesforce SOQL

    • Salesforce® Discussions

      How can I fetch the list views columns in Salesforce?

      Posted by Naman on April 30, 2016 at 6:07 PM

      I want to fetch the list views columns in salesforce. Please tell how to do this.

      Ajay Prakash replied 8 years, 1 month ago 3 Members · 2 Replies
      • List View
      • List View Column
      • Metadata API
      • Salesforce Apex
      • Salesforce SOQL
    • 2 Replies
    • Surbhi

      Member
      June 9, 2016 at 1:16 PM

      Hi Naman,

      This can be done using Metadata API.

      Thanks

    • Ajay Prakash

      Member
      February 12, 2018 at 2:34 PM

      We can retrieve list view column or the records based on the list view id using HTTP request. The response contains the query string that contains columns of the list view.  Below code is for reference –

      public static List<Account> getFilteredAccounts(String filterId){
          HttpRequest req = new HttpRequest();
          String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
          String endPoinURL = baseUrl+’/services/data/v32.0/sobjects/Account/listviews/’+filterId+’/describe’;
          req.setEndpoint(endPoinURL);
          req.setMethod(‘GET’);
          req.setHeader(‘Authorization’, ‘Bearer ‘ + UserInfo.getSessionId());
          Http http = new Http();
          HTTPResponse response = http.send(req);
          Map<String, Object> tokenResponse = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
          String query = (String) tokenResponse.get(‘query’);
          List<Account> AccountList = new List<Account>();
          for(Account accountObj : database.query(query)){
              AccountList.add(accountObj);
          }
          return AccountList;
      }

      In the above example, I have retrieved accounts based on the selected list view.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    How an HMS Improves Patient Billing and Revenue Cycle Management

    Blog in Salesforce

    Introduction In today’s fast-paced healthcare industry, accurate billing and efficient revenue cycle management (RCM) are crucial for maintaining operations and ensuring quality patient care. However,…

    CMS, Healthcare, hms, Software as a Service
    onedata Jan 20, 2026
    35  Views

    Transforming Customer Experience: Why Businesses Need a Salesforce Customer Portal in 2025

    Blog in Salesforce

    Customer experience (CX) is the actual competitive advantage in 2025. Customers demand immediate service, customized service, and convenience based on digital-first at all touchpoints. These…

    Customer Portal, Salesforce CRM, Salesforce Experience Cloud
    CRMJetty Sep 15, 2025
    1,384  Views
    Learn Salesforce Einstein – Chapter 2 (AI Buddy Installation)

    Learn Salesforce Einstein – Chapter 2 (AI Buddy Installation)

    Blog in AI and ML, Salesforce Einstein

    AI Buddy Installation 1. Login in the org, where you want to install the App. 2. Go to Download Page and click on the latest…

    Learn Einstein, Salesforce Einstein, Salesforce Einstein Language
    0to1Code.Com Sep 13, 2017
    4,609  Views

    Popular Salesforce Videos

    Salesforce Billing - Digital Wallets and Alternative Payment Methods

    Salesforce Billing - Digital Wallets and Alternative Payment Methods

    Video in Others, Salesforce Stories

    THE GOAL:  In this video, you will learn how to use Alternative Payment Methods and Digital Wallets with Salesforce Billing. BEFORE YOU BEGIN, KNOW THE…

    salesforce, Salesforce Video, Salesforce Billing, Digital Wallets, Alternative Payment Methods
    Jogender Jul 1, 2020
    3,571  Views
    Salesforce: Learn Workflow Rules in Just 10 min

    Salesforce: Learn Workflow Rules in Just 10 min

    Video in Salesforce Workflow

    Workflows in Salesforce are a fantastic way to automate certain business processes. You can create a rule, and based on certain criteria that you set,…

    Salesforce Tutorial, Salesforce Developer, Salesforce Records, Salesforce Administrator, Salesforce Objects
    Portia Nov 22, 2018
    2,137  Views
    Salesforce Validation Rules - Keep your Data Clean

    Salesforce Validation Rules - Keep your Data Clean

    Video in Data, Salesforce Training

    Watch this short video for just over 2 minutes and learn how to keep your Salesforce data clean? The answer is simple: Use field validation…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Validation Rules in Salesforce
    Pooja May 26, 2021
    1,858  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.