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 › is there any way through which we can upsert list of list of accounts?

    Tagged: Account, List, Salesforce Apex, Salesforce Error, Salesforce sObject, Salesforce SOQL

    • Salesforce® Discussions

      is there any way through which we can upsert list of list of accounts?

      Posted by Nitish on April 30, 2016 at 6:01 PM

      I want to update list of list of account. I am getting list of accounts from many sources, now i want to update them.

      list<list<sObject>> la=new list<list<sObject>>();
      la.add(accountList1);
      la.add(accountList2);
      upsert la;
      Its throwing an error, is there any way through which we can upsert list of list of accounts?

      Himanshu replied 10 years, 4 months ago 2 Members · 1 Reply
      • Account
      • List
      • Salesforce Apex
      • Salesforce Error
      • Salesforce sObject
      • Salesforce SOQL
    • 1 Reply
    • Himanshu

      Member
      May 25, 2016 at 8:56 AM

      Hi Naman,

      You can use this to upsert the list of accounts.

      List<Account> acc = new List<Account>();
      for (List<Account> aList : listOfLists)
      acc.addAll(aList);
      upsert acc;

      Hope this helps you.

    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

    Creating and Adding a Trailhead widget

    Trailhead Widget: Add or Create your Own with Force Leader Board APIs

    Blog in Salesforce Trailhead

    Force Leader Board Widget: It's time to show off. Now add FLB(Force Leader Board) widget to your website and blogs. You can show your badges,…

    Certification Leaderboard, ForceLeaderBoard, ForceLeaderBoard API, Salesforce Developers, Salesforce Trailhead
    0to1Code.Com Mar 6, 2018
    5,766  Views

    Optimizing Fleet and Delivery Management with Salesforce and IoT Tracking Integration

    Blog in Salesforce Data integration

    Fleet and delivery management has become more complex due to rising consumer expectations, fuel costs, and logistics disruptions. In fact, according to Deloitte, 79% of…

    George Aug 4, 2025
    1,444  Views
    7 Signs Your Company Needs a Salesforce Consulting Partner

    7 Signs Your Company Needs a Salesforce Consulting Partner

    Blog in Salesforce Consultant

    1. Struggling with Salesforce Adoption One of the most common challenges businesses face is low adoption rates of Salesforce among their teams. Despite its powerful…

    api-integration, Business Objectives, Change Management, Customer Engagement, Customer Satisfaction
    Infodriven Jun 4, 2024
    735  Views

    Popular Salesforce Videos

    Create Reports In Salesforce With Report Builder

    Create Reports In Salesforce With Report Builder

    Video in Salesforce Training

    Create reports in Salesforce with Report Builder. In this video, the following points will be covered - 1. Introduction Get a brief introduction about reports…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Learning
    Algoworks Jan 22, 2021
    1,825  Views
    Highlights of the Salesforce Winter '22 Release for Nonprofits

    Highlights of the Salesforce Winter '22 Release for Nonprofits

    Video in Salesforce Stories

    The video includes both Winter ‘22 Salesforce Platform updates and Nonprofit Cloud tools. Chapters: 0:00 General Salesforce.com Platform Updates 8:13 Salesforce.com Release for Fundraising and…

    Salesforce Training, Salesforce Tutorial, salesforce, salesforce platform, Salesforce Video
    Jogender Nov 25, 2021
    2,541  Views
    Access Salesforce Maps Schedule and Manage Saved Events

    Access Salesforce Maps Schedule and Manage Saved Events

    Video in Salesforce Training

    Watch this video to learn how to Access Salesforce Maps Schedule and Review and Manage Saved Events. Do let us know in the comment section…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Salesforce Maps
    Abhishek Aug 24, 2021
    1,927  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.