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 › 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 9 years, 10 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

    application solution

    Popular Salesforce Blogs

    Salesforce Salaries

    Blog in Salesforce Career

    The range and scope of opportunities available to a Salesforce professional are among the best in the IT industry and might continue to rise in…

    salary of a salesforce professional, salesforce admin salary, Salesforce Administrator, Salesforce Certification, Salesforce Consultants
    Simplilearn May 2, 2019
    2,980  Views
    How to Delete Components from a Managed - Released Package in Salesforce?

    How to Delete Components from a Managed - Released Package?

    Blog in Salesforce customization, Salesforce Implementation

    Deletion of components is required when a component is no longer in use or a particular component has conflicted with some other components with the…

    Custom Objects, Custom Setting, Custom Settings in Salesforce, Custom Tabs, Lightning Components
    Aman May 11, 2018
    18,985  Views
    Salesforce Downtime

    Understanding the Effects of Salesforce Downtime

    Blog in Salesforce

    With an uncommon degree of reliance on information and innovation today, an infrequent Salesforce downtime is a genuine bad dream for organizations as it might…

    Business Activities, Business Measures, Campaigns, Center Assistance, CIOs
    Ratnesh May 25, 2021
    9,218  Views

    Popular Salesforce Videos

    What is Salesforce Integration? | Saleforce Integration Explained

    What is Salesforce Integration? | Saleforce Integration Explained

    Video in Salesforce Integration

    Learn how to seamlessly connect different tools and data sources with your Salesforce platform. It's all about making informed decisions and gaining a competitive edge!…

    Salesforce Training, Salesforce Integration, Salesforce Partner, salesforce, salesforce platform
    Cyntexa Oct 11, 2023
    958  Views
    How to Test Your Process Builder | Salesforce

    How to Test Your Process Builder | Salesforce

    Video in Salesforce Training

    In this video, Appopedia provides helpful tips on how to test your process builder in Salesforce. She explains how to create a test user, what…

    Salesforce Training, Salesforce Tutorial, Salesforce Apex, salesforce, Salesforce Trailhead
    Rahul kapoor Aug 18, 2022
    2,067  Views
    How to Use Salesforce Process Builder 2017

    How to Use Salesforce Process Builder 2017

    Video in Salesforce Training

    Salesforce process builder is a powerful tool you can use to automate business processes. It has a simple interface that allows you to point and…

    Salesforce Tutorial, Salesforce Administration, Salesforce Admin Training, Salesforce Developer, Salesforce Beginner Tutorial
    Abhay Jan 8, 2018
    1,654  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.