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

    salesforce einstein

    Taking Its Lead From Siri & Alexa, Salesforce Introduces Einstein Voice!

    Blog in Salesforce Einstein, Salesforce Products

    Incorporating voice assistant into a platform for managing tasks verbally is something which has been around for quite some time now. Apple’s Siri, Microsoft’s Cortana,…

    Aplle Siri, Artificial Intelligence, CRM, Digital Transformation, Einstein Voice
    Algoworks Dec 26, 2018
    4,823  Views
    Salesforce-Winter-Realease-19

    Top 12 Salesforce Winter ’19 Features

    Blog in Salesforce Releases

    It’s been a busy month for Salesforce. With the most awaited, world’s greatest tech conference, Dreamforce 2018 unveiling today and the launch of Winter ’19 Release, we are…

    Custom Objects, Dreamforce, Salesforce Attachments, Salesforce Features, Salesforce Lightning
    LevelShift (formerly DemandBlue) Sep 27, 2018
    4,360  Views
    Apex Triggers Unit

    Apex Triggers Unit in Salesforce - The Trailhead Guide

    Blog in Salesforce Apex

    Apex Triggers   Triggers are used to perform custom actions that are executed when a specific event takes place, it can be either before or after…

    Apex Triggers, API, Before Insert, Before Trigger, Bulkified Trigger
    ashutosh pandey Oct 28, 2022
    2,911  Views

    Popular Salesforce Videos

    Salesforce Admin Mock Interview Questions and Answers

    Salesforce Admin Mock Interview Questions and Answers

    Video in Salesforce Admin

    In this Salesforce Mock Interview Series, I'm dropping the seventh podcast/video of the Salesforce Admin Mock Interview Questions and Answers. This will help you to…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Community, Salesforce Admin
    Vivek Jul 8, 2022
    2,597  Views
    Future of Salesforce Job Market | The Shrey Sharma Show

    Future of Salesforce Job Market | The Shrey Sharma Show

    Video in Salesforce Stories

    This is the very first episode of The Shrey Sharma Show with Christopher A Hopper. They discussed Salesforce. Below is a list of questions they…

    Salesforce Developer, Salesforce Consultant, salesforce, Salesforce Ecosystem, Salesforce Industry
    Nauman Sep 27, 2021
    1,614  Views
    Engineer More Than Software at Salesforce

    Engineer More Than Software at Salesforce

    Video in Salesforce Stories

    Salesforce engineers are builders. Together, we’ve created a platform that helps companies around the world connect with their customers. Driven by our commitment to trust,…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Jogender Mar 23, 2021
    1,280  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.