Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to typecast a list of Salesforce sObjects into list of Accounts?

    Tagged: Account, List, Salesforce Customization, Salesforce Development, Salesforce sObject

    • Salesforce® Discussions

      How to typecast a list of Salesforce sObjects into list of Accounts?

      Posted by Kumar on December 8, 2016 at 7:29 AM

      Hi everyone,

      I have a list of type sObject, and I want to typecast it into a list of Accounts, i.e.

      list<sObject> into list<Account>

      How do I implement this?

      Thanks in advance.

       

      • This discussion was modified 9 years, 11 months ago by  Kumar.
      • This discussion was modified 9 years, 11 months ago by  Forcetalks.
      • This discussion was modified 9 years, 11 months ago by  Forcetalks.
      Kumar replied 9 years, 11 months ago 2 Members · 2 Replies
      • Account
      • List
      • Salesforce Customization
      • Salesforce Development
      • Salesforce sObject
    • 2 Replies
    • sushant

      Member
      December 8, 2016 at 11:19 AM

      Hi kumar,

      Suppose we have a list<sobject> named as l1 then we can use this kind of syntax (list<Account> l1) tp type cast it.i have type cast sobject list to Account list in this syntax.

      Hope this helps you

      Thanks

    • [adinserter block='9']
    • Kumar

      Member
      December 8, 2016 at 11:29 AM

      Thanks dude

    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

    Popular Salesforce Blogs

    What is Salesforce Digital Engagement in 2024?

    Blog in Others

    What is Digital Engagement? Salesforce Digital Engagement is a customer service product that helps companies communicate with customers via messaging apps, webchats, in-app chats, and…

    Boost Customer Satisfaction, Customer Service, Digital Engagement, Einstein Bots, email-to-case
    Vimera | Andersen Jan 4, 2024
    2,639  Views

    Guided Selling and Complex Billing in Manufacturing with Salesforce

    Blog in Salesforce

    For a manufacturing company, preparing professional and accurate quotes is just as important as other operations. It may sound easy, but as the number of…

    Applications, Automated Performance, Automated Quotations, Automated Reporting, Billing Process
    360 Degree Dec 17, 2021
    4,342  Views

    The Salesforce Trainers | Salesforce Consulting and B2B Sales Training

    Blog in Salesforce

    I am Mark Christie, Founder and Principal Consultant of The Salesforce Trainers, based in Toronto and serving clients across North America. I help B2B sales…

    Liya Oct 29, 2026
    541  Views

    Popular Salesforce Videos

    Salesforce Quickbooks Integration | eShopSync for Quickbooks

    Video in Salesforce Integration

    Product Sync? Invoice Sync? And more? eShopSync for Quickbooks brings out the best-class solution for Salesforce Quickbooks Integration. Click on the link to know more:…

    Salesforce Integration, salesforce, Salesforce Quickbooks Integration, Salesforce Video, Salesforce Learning
    Deepika Jul 23, 2020
    2,316  Views
    Marketing Cloud To Become Customer Company

    Marketing Cloud To Become Customer Company

    Video in Salesforce Cloud Platform

    Leverage Marketing Cloud's ability to engage customers by delivering premium personalized experiences and building meaningful relationships with them. Contact Cyntexa to boost your business with…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, salesforce services
    Cyntexa Dec 8, 2021
    2,755  Views
    How Salesforce Supports Military Families

    How Salesforce Supports Military Families

    Video in Salesforce Stories

    Join Rachel Dishman, Lead Solution Engineer at Salesforce, as she discusses the ways that Salesforce supports military families. By tuning in, you'll hear more about…

    Salesforce Training, Salesforce Tutorial, Salesforce Jobs, salesforce, Salesforce Ecosystem
    Prafull Nov 12, 2021
    2,165  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®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.