Hi guys.
Is there a way to send an array using oModel.create() function ?
I use below code but I use create function twice for two records :
var oModel = new sap.ui.model.odata.ODataModel("MyServer:8000/sap/opu/odata/sap/MyCollection/"); var oEntry = []; oEntry.push( { Name : "My Name", LastName : "My Last Name" }); oEntry.push( { Name : "My Name 2", LastName : "My Last Name 2" }); oModel.create('/PersonsSet', oEntry[0], null, onSuccess, onError, true); oModel.create('/PersonsSet', oEntry[1], null, onSuccess, onError, true);
I tried below code but I received the following error :
Value | System expected the element '{http://www.w3.org/2005/Atom}entry' |
oModel.create('/PersonsSet', oEntry, null, onSuccess, onError, true);
How to send array using create function 1 times ?