Is it possible to insert an array of objects using Remote Object Model?
Here's my code:
<apex:remoteObjects jsNamespace="romodel">
<apex:remoteObjectModel name="Stock__c" jsShorthand="Stock" fields="Location__c,Product__c,LocationRetailPrice__c">
</apex:remoteObjectModel>
</apex:remoteObjects>
And then in js:
stockObject = {
Location__c: $j('.select-store-div option:selected').val(),
Product__c: productsArray[key]['Id'],
LocationRetailPrice__c: productsArray[key]['newPrice']
};
stockList.push(stockObject);
var stockCall = new romodel.Stock(stockList);
stockCall.create();
How can I edit my code to get this to work?