Hi Soumya,
with the definition of the odata service I mean the content of the .xsodata file of the service you use, for example
service namespace "workshop.services" {
"test/myview.attributeview" as "aribausers" keys generate local "ID";
}
And here's a sample how to use the create method of the ODATAModel:
btnCreateUser.attachPress(function() { var entry = {}; entry.ID = tfUserId.getValue(); entry.USERNAME = tfUserName.getValue(); oData.create('/tbl_user', entry, null, function(ret) { alert("Create successful"); console.log(ret); }, function() { alert("Create failed"); } ); });
Greets,
ben