function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Venkat Reddy 45Venkat Reddy 45 

Bulk Insert records

Dear Experts,

         I want to know how to insert bulk records in SF?

Regards,
Venkat.
Best Answer chosen by James Loghry
pconpcon
Are you trying to do this via Apex, REST or a 3d party?

You can simply insert a List of sObjects
List<Account> accounts = new List<Account>{
    new Account(...),
    new Account(...)
};

insert accounts;

You can make a bulk call in REST [1], or you can use a number of different dataloaders [2] [3] or other tooling options [4]

[1] https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/
[2] https://developer.salesforce.com/page/Data_Loader
[3] http://www.pocketsoap.com/osx/lexiloader/
[4] https://jsforce.github.io/document/#bulk-api