I have been looking at this for quite some time and I don't know why it fails, because in another controller I have the same code and it updates the model. What do you think it could be?
onAcepta: function(oEvent) {
var oModel = this.getOwnerComponent().getModel();
var oDataModel = this.getOwnerComponent().mainIdentJson;
console.log(oDataModel);
var sPath = "/IdentitiesSet(Userid='" + oDataModel.Userid + "',Ident='" + oDataModel.Ident + "')";
oModel.update(sPath, oDataModel, {
success: function(oData, oResponse){
console.log("OK");
},
error: function(oResponse){
console.log("No");
}
});
this.closeParent();
this.selectedItems = [];
}
Error in Log-dbg.js
:
2021-08-13 14:01:40.161899 Request failed with status code 400: MERGE IdentitiesSet(Userid='?????????'.Ident='?') - [{"code":"SY/530","message":"Inline component is not defined or not allowed (HTTP PUT)","persistent":false,"targets":["/IdentitiesSet(Userid='?????????'.Ident='?')"],"type":"Error"}] sap.ui.model.odata.ODataMessageParser
[![2021-08-13 14:01:40.161899 Request failed with status code 400: MERGE IdentitiesSet(Userid='?????????'.Ident='?') - [{"code":"SY/530","message":"Inline component is not defined or not allowed (HTTP PUT)","persistent":false,"targets":["/IdentitiesSet(Userid='?????????'.Ident='?')"],"type":"Error"}]
this is the batch: and the changes that I want are okay
batch: so, I think that the batch is doing okay? so I don't know the error
and the weird thing is that in other view in this project, I have an update with this same path and works perfectly.