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

    Control Salesforce Lightning Tabs With Next & Back Buttons

    Control Salesforce Lightning Tabs With Next & Back Buttons

    Blog in Coding and Scripting, Lightning, Salesforce Implementation

    Hello, In this post, we are going to create a sample lightning component to control <lightning:tab> with Next and Back buttons. In this code we…

    Custom Component in Salesforce, Salesforce Customization, Salesforce Lightning, Salesforce Lightning Code, Salesforce Lightning Component
    Ratnakar Mar 28, 2018
    11,726  Views

    Simplifying Salesforce CPQ Migration: A Spotlight on iSyncSF

    Blog in Salesforce Data integration

    In the dynamic landscape of modern business, the seamless transition of critical systems like Salesforce CPQ (Configure, Price, Quote) between different Salesforce orgs is paramount.…

    Business Transformations, Configuration Mapping, Data Integrity, Data Management, Data Migration
    H2TECH Apr 2, 2024
    562  Views

    Integrating Single Salesforce Org With Multiple Jira Instances with Sinergify

    Blog in Salesforce integration

    Why the need for different Jira instances within the same organization? As we all know, Salesforce is a CRM platform and organizations use it for…

    Atlassian Jira, Communication and Collaboration, CRM Platform, Customer Data-related Activities, Integrate Multiple Jira Instances
    Shubham Mar 22, 2021
    3,158  Views

    Popular Salesforce Videos

    How to Delete Preloaded Sample Data in New Salesforce Organizations

    How to Delete Preloaded Sample Data in New Salesforce Organizations

    Video in Salesforce Training

    When Users begin a trial or subscription with Salesforce, their org comes with a set of sample data. This data includes Accounts, Contacts, and Opportunities.…

    salesforce, Salesforce Video, Salesforce Learning, Salesfore Training, Data
    Jogender May 25, 2021
    3,541  Views
    How Salesforce Industries can be Used on Top of Salesforce?

    How Salesforce Industries can be Used on Top of Salesforce?

    Video in Salesforce Training

    Salesforce Industries offers pre-built solutions on the Salesforce platform that solve the needs of particular industries. Vlocity takes these common requirements and packages them into…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, salesforce, Salesforce Admin
    Cyntexa Nov 18, 2022
    1,462  Views
    How to Create an Automated File Import in Salesforce Marketing Cloud

    How to Create an Automated File Import in Salesforce Marketing Cloud

    Video in Marketing, Salesforce Training

    Cameron Robert shows how to create an automation to import files from your FTP into Data Extensions in Salesforce Marketing Cloud. File Import Automations are…

    Salesforce Training, Salesforce Marketing Cloud, Salesforce Video, Salesforce Learning, Training
    Cameron Sep 17, 2021
    3,152  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.