Hi,
I am designing simple application in that i applied all CRUD function. Create Read Delete functions are working nut in Update it is not working
onUpdate: function() {
var that = this;
var oDialog = new sap.m.Dialog({
title: "Update Product",
content: [
/*new sap.m.Label({
text: "Product ID"
}),
new sap.m.Input(),*/
new sap.m.Label({
text: "Product Name"
}),
new sap.m.Input(),
],
endButton: new sap.m.Button({
text: "Close",
press: function() {
oDialog.close();
}
}),
beginButton: new sap.m.Button({
text: "Save",
press: function() {
var udata = {
Name: this.getParent().getContent()[3].getValue(),
};
var myDialog = this.getParent();
that.getView().getModel().update("/ProductSet('"+ udata +"')", udata, {
success: function() {
sap.m.MessageToast.show("Product Update Successfully");
myDialog.close();
},
error: function() {
sap.m.MessageToast.show("Error Occur");
}
});
}
}),
});
oDialog.open();
}
i am getting issue on Name: this.getParent().getContent()[3].getValue(),
please tell me how to rectify that error