How to create multiple records using the createRecord method in LDS?
Though LDS is typically used to interact with the single record we can use LDS methods to perform DML on multiple records.
• 1 min read
In this blog post, we checked how to insert or create a record using
createRecord() using LDS.
Then comes the question, is it possible to insert multiple records using
createRecord() method in LDS? In short, the answer is YES!
Let me walk you through the code.
This approach of using promises to insert multiple records using promises is not suggested unless we are very certain that we will only be dealing with less than 5 - 10 records.
Anyday it's suggested that we use Apex to bulk process the records.
Hope this is helpful.