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

    • 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

    Rolling-Out-Lightning-Experience

    Top 3 Techniques for Rolling Out Salesforce Lightning Experience

    Blog in Lightning, Salesforce Products

    If you are a regular reader of Salesforce and its related products and services, you must already know by now what Salesforce Lightning is. As soon as…

    Features of Salesforce Lightning, Implement Salesforce Lightning, Lightning Components, Lightning Experience, Salesforce Lightning
    William Feb 26, 2019
    3,116  Views
    Salesforce Implementation

    Salesforce Implementation Checklist: 9 Steps to Success

    Blog in Salesforce Implementation

    Through it all, Salesforce continues to remain one of the largest players and one of the best platforms in the market. But we all know…

    Best Implementation, Best Salesforce Implementation, Business, Business Needs, Company
    DB Nov 16, 2021
    4,659  Views
    SMS App in Salesforce

    Benefits of Acquiring Best SMS App in Salesforce

    Blog in Salesforce Products

    The customer's tastes and preferences are dynamic. Due to this, businesses need to revamp their communication strategies to serve customers with the best experience and…

    Appointment Reminders, Automated Conversation, Automated Texts, Automation, Best SMS App
    360 SMS APP Jun 9, 2021
    3,504  Views

    Popular Salesforce Videos

    Salesforce Acquires Slack

    Salesforce Acquires Slack

    Video in Salesforce Stories

    When Salesforce bought Slack earlier this week for $27.7 billion, it was in some ways the end of a startup fairytale. Slack was the living…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Slack
    Algoworks Dec 14, 2020
    1,384  Views
    Introduction to Salesforce Flow Builder

    Introduction to Salesforce Flow Builder

    Video in Salesforce Stories

    Watch this video to learn about Salesforce Flow Builder. 0:00 Introduction 2:50 Introduction to Salesforce Flows 4:40 Types of flows, Screen, Auto-Launched 7:10 Components related…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Jogender Jun 27, 2022
    2,046  Views
    Objects and Tabs in Salesforce

    Objects and Tabs in Salesforce

    Video in Salesforce Admin

    Watch this video to learn all about Objects and Tabs in Salesforce. If you have any doubts or concerns please let us know in the…

    Salesforce Training, Salesforce Tutorial, Salesforce Objects, Learn Salesforce, Salesforce Video
    CRS Feb 1, 2022
    1,590  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.