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

    Generate More Leads With Salesforce's Data.com

    Blog in Data, Salesforce

    Salesforce.com's Sales Cloud customer relationship management (CRM) software includes a sales and lead creation component called Data.com. Through its enormous user-generated database, the Data.com platform…

    AppExchange Packages, Apps, Business, Clean Account, Clean Jobs
    Apphienz Nov 3, 2021
    2,683  Views

    Salesforce Consulting Services: What Does a Salesforce Administrator Do?

    Blog in Salesforce Admin, Salesforce Consultant

    It is evident from the fact that any given technology can bring laurels to a company. Not only this, but it can also brighten job…

    Automation, Business Growth, Business Issues, Business Processes, Business Prospect
    Emorphis May 31, 2021
    1,969  Views
    Google Tag Manager

    Implementation of Google Tag Manager For Salesforce Communities

    Blog in Salesforce integration, Salesforce Training

    Introduction Without depending upon the developer, your marketing team can deploy marketing tags and tracking pixels. Google Tag Manager gives you permission to track video…

    Browsing Session, Community Builder, Configure Triggers, Content Security Policies, Events
    Deepak Jan 4, 2021
    35,510  Views

    Popular Salesforce Videos

    Top 6 Products by Salesforce Marketing Cloud

    Top 6 Products by Salesforce Marketing Cloud

    Video in Marketing, Salesforce Cloud Platform

    Salesforce is largely regarded as the most influential Salesforce automation and cloud CRM vendor, having popularized the SaaS model and, in the process, disrupted the…

    salesforce, Salesforce Marketing Cloud, Salesforce Automation, Salesforce Video, Cloud CRM Vendor
    Algoworks Feb 4, 2021
    1,615  Views
    Salesforce Lightning Design System (SLDS) and Components

    Salesforce Lightning Design System (SLDS) and Components

    Video in Lightning, Salesforce Training

    The Salesforce Lightning Design System (SLDS) helps you build applications with the look and feel of Lightning Experience without writing a single line of CSS.…

    Salesforce Development, Salesforce Lightning Components, Apex, Visualforce, Slds
    Shiv Kumar Sharma Jan 11, 2018
    2,788  Views
    Pass Record Id into Flow from Record | Salesforce Tutorial

    Pass Record Id into Flow from Record | Salesforce Tutorial

    Video in Salesforce Training, Salesforce Automation

    Passing record ids is a technique that every flow master needs to know to use flows to their full potential. In this video, we go…

    Salesforce Training, Salesforce Tutorial, salesforce knowledge, Salesforce Flow, Salesforce Video
    Warren Nov 4, 2020
    7,954  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.