on 12-15-2016 7:04 AM
Hi Guys,
Am trying to use content Id for my associations and am also using the V2 Odata Model.For this am using the below code and it is not working.
Regards-Pulla.
sPath = "/OrderSet('" + oDataSave.OrderId + "')";
oDataModel = this.getModel();
oDataModel.setDeferredGroups(["myId"]);
oDataModel.setChangeGroups({
"Order": {
groupId: "myId",
changeSetId: "Test",
single: true
}
});
Etag = oDataModel.getETag(sPath);
mParameters = {
success: function(oData) {
MessageToast.show("Data successfully Saved!");
},
error: function(sError) {
jQuery.sap.log.info("FYI: something has happened and it is a data error");
},
eTag: Etag,
groupId: "myId",
changeSetId: "Test",
merge: false
};
oDataModel.update(sPath, oDataSave, mParameters);
sPath = "/OrderSet('" + oDataSave.OrderId + "')" + "/ToOrderLocation";
mParameters = {
success: function(oData) {
jQuery.sap.log.info("FYI: it is success");
},
error: function(sError) {
jQuery.sap.log.info("FYI: something has happened and it is a data error");
},
groupId: "myId",
changeSetId: "Test",
merge: true
};
oDataModel.update(sPath, {OrderId: oDataSave.OrderId,WellId:"100247"}, mParameters);
oDataModel.submitChanges();
}
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.