Im trying to post data in batch call using OData service. But im getting Error like HTTP Request Failed. Im not able to find the exact error. Can some one please help me to fix this? Below is my code..
var payloadTest = {
"Userid" : "",
"RecId" : "000000012651",
"Pernr" : "00039411",
"Ename" : "Investment Test",
"AttAbsType" : "TT01",
"MarkAbst" : "",
"Count" : 0,
}
batchChanges.push(that.ODataModel.createBatchOperation(
"TestService('123')", "POST", payloadTest));
that.ODataModel.addBatchChangeOperations(batchChanges);
that.ODataModel.setUseBatch(true);
that.ODataModel.submitBatch(function(data, value) {
that.ODataModel.refresh();
if (data.__batchResponses[0].__changeResponses) {
that.busyDialog.close();
MessageBox.success(data.__batchResponses[0].__changeResponses.length);
} else {
that.busyDialog.close();
MessageBox.error(data.__batchResponses[0].message);
}
}, function(err) {
that.busyDialog.close();
MessageBox.error("Error occurred", err);
});
Please see the below error description in below image..
Please help me to fix the issue..
Thank you in advance