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 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 ago by  Kumar.
      • This discussion was modified 9 years ago by  Forcetalks.
      • This discussion was modified 9 years ago by  Forcetalks.
      Kumar replied 9 years 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

    • 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

    application solution

    Popular Salesforce Blogs

    Salesforce Integration with LinkedIn

    Salesforce Integration with LinkedIn - Here's All You Need to Know

    Blog in Salesforce integration

    The general approach to selling doesn’t work as effectively in today’s world. You cannot expect extraordinary results by pushing out bulk emails to every prospect…

    AppExchange, Bulk Emails, Chrome Extensions, Contact Page Layout, Custom Tool
    Ato Jun 30, 2022
    5,006  Views

    What is Einstein Analytics in Salesforce and How it Works?

    Blog in Salesforce Einstein

    Each business collects ample amounts of data, the volume of which grows day after day: customer database, analytics of interaction with customers at each stage…

    Arithmetic Mean, Artificial Intelligence, BI tool, Billing Country, Blank Dashboard
    Sparkybit Sep 14, 2023
    1,691  Views

    Migrating Your Existing Salesforce and Jira Integration to Sinergify

    Blog in Salesforce integration

    Migration process, ugh! That’s the usual expression when we hear about switching from one technology or tool to another. And that’s because transitioning to a…

    AppExchnage, Connector, Custom Integration, Customers, eBook
    Shubham Dec 27, 2021
    2,531  Views

    Popular Salesforce Videos

    Einstein Opportunity Scoring For Everyone | Salesforce

    Einstein Opportunity Scoring For Everyone | Salesforce

    Video in AI and ML, Salesforce Einstein

    Let artificial intelligence help you and your sales team focus on the right opportunities and close more deals. See how Einstein Opportunity Scoring makes it…

    salesforce, Artificial Intelligence, Salesforce Einstein, Salesforce Video, Einstein Opportunity Scoring
    Rupal Kakkar Aug 18, 2020
    1,845  Views
    Salesforce Lightning Tutorial - How to Delete Records from Server

    Salesforce Lightning Tutorial - How to Delete Records from Server

    Video in Lightning

    In this particular video you'll learn how to delete records from custom Salesforce Lightning Component using Apex Controller Method.

    Salesforce Records, Easy Way To Learn Salesforce, How To Learn Salesforce Lightning, How to Salesforce Lightning Component, Building Lightning Components in Salesforce
    Abhay Dec 19, 2018
    2,474  Views
    Wow Your Customers with Salesforce Customer 360 Salesforce

    Wow Your Customers with Salesforce Customer 360 Salesforce

    Video in Salesforce Products

    Wow Your Customers with Salesforce Customer 360 Salesforce. Watch this video to learn all about it. Do let us know in the comments if you…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Account
    Rupal Kakkar Mar 28, 2022
    2,956  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

    © 2025 - 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.