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, 6 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

    No Code Tableau and Salesforce Integration

    Blog in Salesforce integration

    No Code Salesforce integrations are the best way to seamlessly integrate various software and platforms to boost productivity and enhance overall performance. With the new…

    Authentication Tab, Authentication Type, Best Practices, Boost Productivity, Businesses
    Apphienz Feb 1, 2022
    2,401  Views
    algoworks at norcaldreamin

    Attending NorCal Dreamin’ 2019? Stop By Algoworks At Booth No. 14!

    Blog in Salesforce

    Algoworks is going to Sacramento this June to pal around with the members of the Salesforce family. The Salesforce community is gathering for NorCal Dreamin’…

    Automation, Blackthorn, Career Development, CPQ, Developer Sessions
    Algoworks Jun 24, 2019
    4,486  Views

    Create a Data Culture in Your Organization to Plan Data-Driven Strategies

    Blog in Data, Salesforce

    For any company, data is the key to success. But for that, you need to know how exactly you could use all that data that…

    Business, Business Growth, Business Problems, Capture Data, Company
    360 Degree May 24, 2022
    2,480  Views

    Popular Salesforce Videos

    What is APEX? | Features of APEX | Salesforce Development Course

    What is APEX? | Features of APEX | Salesforce Development Course

    Video in Salesforce Apex, Salesforce Training

    This is the first Chapter of the Salesforce Development Course video series. In this video, Shrey has answered the following questions: What is APEX? What…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, salesforce, Apex
    Prafull Jun 18, 2021
    1,963  Views
    How to Create Custom Field in Lighting Experience | Salesforce

    How to Create Custom Field in Lighting Experience | Salesforce

    Video in Lightning, Salesforce Training

    Fields you create on standard or custom objects are called custom fields. You can create a custom field on the Contact object to store your…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Custom Objects
    Abhishek Dec 29, 2021
    1,696  Views
    Easy Salesforce Lightning Experience Tricks for Admins

    Easy Salesforce Lightning Experience Tricks for Admins

    Video in Lightning

    Learn how to enhance the screens for your end users by leveraging Related List - Quick Links, Report Charts and dynamic filters to show the…

    Salesforce Online Training, Salesforce Lightning, Salesforce Lightning Experience, Salesforce Administrator, Lightning App Builder
    Prafull Feb 21, 2018
    1,678  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.