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

    How To Optimize Automated Tests and Securely Log in to Salesforce Without Verification Code or MFA?

    Blog in Salesforce Security

    Like in any software testing, automation testing of Salesforce solutions is a reliable approach to verify the functionality and integrity of the platform. Automated tests…

    Authorization, Automated Tests, Automation, Autotest, Browser URL
    ENWAY Sep 8, 2023
    1,312  Views
    Salesforce Custom Objects

    More About Salesforce Custom Objects Behavior

    Blog in Salesforce

    Utilize the accompanying points to work out how the API communicates with custom items and fields: Naming Conventions for Custom Objects Relationships Among Custom Objects…

    API, API Communicates, API Names, Audit Fields, Contact Object
    MOHIT Dec 16, 2020
    3,864  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,432  Views

    Popular Salesforce Videos

    Salesforce: Everything You Need to Know About Order Management

    Salesforce: Everything You Need to Know About Order Management

    Video in Salesforce Training

    THE GOAL: Which Salesforce Order Management application is best? Well, that depends…. Salesforce offers three primary applications for order management, and they all work extremely…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Learning, Business
    Abhishek Jul 12, 2022
    1,702  Views
    Dynamic Forms | Lightning Record Page | Salesforce

    Dynamic Forms | Lightning Record Page | Salesforce

    Video in Salesforce Products

    In Summer 20, Dynamic Forms adds the Field Section and Field components to App Builder, so admins can use App Builder to create their page…

    Salesforce Training, salesforce, App Builder, Salesforce Video, Salesforce Learning
    Rupal Kakkar May 11, 2020
    2,407  Views
    Salesforce Marketing Cloud Connector for UiPath

    Salesforce Marketing Cloud Connector for UiPath

    Video in Salesforce Products, Marketing, Salesforce Cloud Platform

    This is a connector for Salesforce Marketing Cloud that allows you to work in the background with SFMC instance. watch this video and let us…

    Salesforce Training, Marketing Automation, Salesforce Marketing Cloud, Salesforce Video, Salesforce Learning
    Cristian Nov 19, 2020
    1,613  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.