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

    On Cloud Shoes On Cloudsurfer: Ride the Wave of Innovation

    Blog in Salesforce integration

    On Cloud Shoes On Cloudsurfer: Ride the Wave of InnovationDiscover the Performance of On Cloud Shoes In the ever-evolving world of running footwear, On Cloud…

    On Cloud, On Cloud shoes
    Oncloud Nov 11, 2025
    14  Views

    Salesforce Health Cloud for Insurance: Optimize Operations

    Blog in Salesforce

    Insurance companies are constantly looking for ways to streamline their operations and provide better customer service. One solution that has gained significant traction in the…

    Automation, Benefits, Billing systems, Care Management, claim status
    Emorphis Oct 26, 2023
    2,044  Views

    How to Send Any Salesforce Notifications to Slack Channels: A Complete Guide

    Blog in Salesforce integration

    As a Salesforce developer, you don’t limit yourself to only coding. Also, you have to create and manage lots of Salesforce notifications. It is helpful…

    Authentication Credentials, Block Kit Builder, Block Kit Formatting, Colorful Messages, Complete Guide
    ENWAY Sep 4, 2023
    1,550  Views

    Popular Salesforce Videos

    Is Trailhead enough to crack Salesforce Interview?

    Is Trailhead enough to crack Salesforce Interview?

    Video in Salesforce Certifications

    In this video, Shrey answered one of the most asked questions related to Salesforce Interview. Let's see how beautifully Shrey answered this Question. We hope…

    Salesforce Training, Salesforce Jobs, Salesforce Certification, salesforce, Trailhead
    Jogender Apr 14, 2021
    1,458  Views
    Apex Performance Tips and Tricks | Salesforce Video Guide

    Apex Performance Tips and Tricks | Salesforce Video Guide

    Video in Salesforce Apex

    Watch this video to learn all about Apex Performance: • What do we mean by performance? • How do we measure performance? • Loop Performance…

    Salesforce Training, Salesforce Tutorial, Salesforce Apex, SOQL, Salesforce Video
    Jogender May 17, 2021
    1,769  Views
    How Much Time to Give to Salesforce Preparation?

    How Much Time to Give to Salesforce Preparation?

    Video in Salesforce Training, Salesforce Admin

    Wondering how much time to give for Salesforce preparation? Watch this video it explains distinctly how much time you need to learn. If you have…

    Salesforce Training, Salesforce Tutorial, Salesforce Online Training, Salesforce Jobs, Salesforce Developer
    CRS Jun 13, 2022
    1,743  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.