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

    Permission Sets in Salesforce

    Learn About Permission Sets in Salesforce | Salesforce Security Guide

    Blog in Salesforce Admin

    Permissions set and Profiles in Salesforce to limit what people may access, view, and do in their Salesforce org.  The permission set resembles that of…

    API Name, App Settings, Assigned Apps, Description, Enabled Apps
    Avinash Patel Jul 15, 2022
    3,438  Views
    Salesforce Einstein Analytics Studio

    Salesforce Einstein Analytics Studio

    Blog in Salesforce Einstein, Salesforce Implementation, Salesforce Products

    Analytics Studio A part of Einstein analytics and a best way to import data either through internal or external sources of salesforce. By using csv file,…

    Dataset Builder, Dataset in Salesforce, Einstein Analytics Studio, myOpportunities, Salesforce Einstein
    Archit Jan 9, 2018
    16,318  Views

    No Code Salesforce and Yesware Integration

    Blog in Salesforce integration

    Salesforce integration provides a comprehensive perspective of data, allowing for better decision-making based on a thorough knowledge of risks and advantages. It also allows for…

    Customer Data, Data Entry, Data Flow, Decision Making, Duplicate Data
    Apphienz Apr 4, 2022
    2,032  Views

    Popular Salesforce Videos

    Data Import: Prepare your Data for Import | Salesforce

    Data Import: Prepare your Data for Import | Salesforce

    Video in Data, Salesforce Training

    This short video walks you through how to clean up your import files in preparation for getting your data into Salesforce. We'll walk you through…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Clean Data
    Abhishek Oct 21, 2021
    2,620  Views
    Meet the Salesforce Singapore Small Business Relief Grants Recipients

    Meet the Salesforce Singapore Small Business Relief Grants Recipients

    Video in Salesforce Stories

    Small businesses are the heart of our community and the driver of the economy. Salesforce and Singapore Business Federation are pleased to announce the successful…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Community, Salesforce Video
    Nauman Apr 2, 2021
    2,062  Views
    5 Mind-Blowing New Salesforce Marketing Cloud Releases

    5 Mind-Blowing New Salesforce Marketing Cloud Releases

    Video in Marketing, Salesforce Cloud Platform

    The Statist worldwide marking survey reports- “Almost 4 billion world population is digitally active, and 2.14 of them are shopping online.” In this entire scenario,…

    Artificial Intelligence, Salesforce Marketing Cloud, Customer Engagement, Internet of Things, Salesforce Video
    Algoworks Feb 23, 2021
    2,166  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.