Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8746

Re: Error in CRUD application calling from an UI

$
0
0

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


Viewing all articles
Browse latest Browse all 8746

Trending Articles