Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onUpdate: function() {
- var oEntry = {};
- oEntry.Id = sap.ui.core.Fragment.byId("EditFr2", "idPerson").getValue();
- oEntry.ZzfirstName = sap.ui.core.Fragment.byId("EditFr2", "idfName").getValue();
- oEntry.ZzlastName = sap.ui.core.Fragment.byId("EditFr2", "idlName").getValue();
- oEntry.Active = sap.ui.core.Fragment.byId("EditFr2", "idChB").getSelected();
- var sUrl = "/sap/opu/odata/SAP/ZODATA_APP_10_SRV/";
- var oModel = new sap.ui.model.odata.v2.ODataModel(sUrl);
- oModel.update("/PersonSet('" + oEntry.Id + "')", oEntry, {
- success: function(){MessageToast.show(" Entry was successfully updated");},
- error: function(oError){ if(oError) {MessageToast.show("Entry was not updated");}}
- }
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement