Can we create multiple records at a time using remote object create() call?
If yes what is the syntax? I tried passing a list of objects to create call but it didn't work.
2 Answers
Creation of multiple records is not possible for create Call currently and the only alternative is to go for Javascript Remoting instead of the Visualforce Remote Objects .
The downside of using JSR will be you will need an apex code at the backend and handle security yourself but it has flexibility to return data in the format you need and accept a single object or Multiple rows as a Parameter.
@RemoteAction
global static List<Account> processAccounts(List<Account> lstacc) { ... }
I think you can only update several records at a time and then the updated values have to be identical.
See example here.
Hope this helps.
-Florian
-
Florian - The question was for create call not update Commented May 9, 2016 at 14:39
-
You are right I should have been clearer. Multiple records in one request on Create is not possible. ONLY on update. Commented May 9, 2016 at 15:05