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

    Meet Brandy - The New Face of Salesforce Marketing

    Blog in Salesforce

    We now live in a digital-first era. The expectations of customers are shifting. We're able to work from wherever. What is a marketer to do…

    Appy, Astro, Businesses, Client Relationships, Codey
    Apphienz Aug 27, 2021
    2,510  Views

    Reasons Why Commercial Banking Should Consider Moving to Salesforce Financial Services Cloud

    Blog in Salesforce Cloud Platform

    The banking industry has completely transformed and now what matters the most is how a bank is able to deliver personal experiences to its customers…

    Artificial Intelligence, Asset Management, Auto-assigning Tasks, Automate Tasks, Bankers
    360 Degree Jan 14, 2022
    2,933  Views
    Salesforce Chatter

    Understanding Salesforce Chatter and Its Implementation

    Blog in Salesforce

    Chatter is a place for collaboration in Salesforce where you can post chatter feeds, share files, create new events, and create interactive user polls.  In…

    App Launcher, Archived, Business Information, Chatter, Chatter Feeds
    Narendra Sa Feb 21, 2022
    4,991  Views

    Popular Salesforce Videos

    Salesforce Web-to-Case in under 5 Minutes

    Salesforce Web-to-Case in under 5 Minutes

    Video in Others, Salesforce Training

    we'll see how to make a Salesforce Web-to-Case form quickly and easily, and how to embed it in our Word press website. This whole process…

    Salesforce Developer, Salesforce Forms, Salesforce VIdeos, Web To Case Form, Wordpress
    lavish Feb 4, 2020
    2,292  Views
    How To Use Javascript Editor In Formstack Part 2 - Learn Salesforce Series By Algoworks

    How To Use Javascript Editor In Formstack Part 2 - Learn Salesforce Series By Algoworks

    Video in Salesforce Integration, Salesforce Training

    Learn how to integrate Javascript editor in Formstack in this Salesforce tutorial brought to you by Algoworks. Did you miss the complete tutorial? To watch…

    Salesforce Training, Salesforce Integration, salesforce, salesforce services, Salesforce Video
    Algoworks Aug 28, 2020
    2,340  Views
    Get a Salesforce Developer Job in 5 Steps | For Freshers | For Admins | For Non-SFDC People

    Get a Salesforce Developer Job in 5 Steps | For Freshers | For Admins | For Non-SFDC People

    Video in Salesforce Training, Salesforce Admin

    In this video, We will be talking about some tips to get your first job as a Salesforce Developer. If you are a recent graduate,…

    Salesforce Training, Salesforce Jobs, salesforce, Salesforce Admins, Salesforce Developers
    Pooja May 1, 2020
    2,012  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.