cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data ODataModel batch request response?

xyla
Participant
0 Kudos

Hi All,

is there a possibility to retrieve the data from the response of a batch request?

BR,

Szilamér

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

post what you already have, of course it is possible to get data back from batch

that blog is pre-v2 though

xyla
Participant
0 Kudos

Thank you! This is what i was looking for (copied from the blog):

  1. that.oModel.submitBatch(function(data) { 
  2.       that.oModel.refresh(); 
  3.       sap.ui.commons.MessageBox.show(data.__batchResponses[0].__changeResponses.length 
  4.         + " contacts created", sap.ui.commons.MessageBox.Icon.SUCCESS, 
  5.       "Batch Save", sap.ui.commons.MessageBox.Action.OK); 
  6.     }, function(err) { 
  7.       alert("Error occurred "); 
  8.     }); 

"data" contains the response data i need.

BR,

Szilamér

0 Kudos

do we have solution for V4?

Answers (1)

Answers (1)

venkatachala_ck
Active Participant
0 Kudos

Hi Joo,

Check out my blog

Regards

Venkat