cancel
Showing results for 
Search instead for 
Did you mean: 

model.update - call to entitySet and entity after success

Former Member
0 Kudos

Hello

I am carrying out a call to update some data in the back end from user input modifying data in a simple form.

I use the following code:

oModel.update(sEntityPath, mPayload, {

    success : function(mResponse) {

     //some code

  }, 

  error : function(oError) {

     //some code

  }

});

Everything works as expected and I get the data that has been modified in the backend method XXXXX_UPDATE_ENTITY.

However after the response is returned (204 No Content) and the success function is called I notice that there are 2 more requests back to the server.

There is a request to the entitySet and then a request to the entity.

I don't think this is anything to do with my code, I think it is part of UI5.

Does anyone have an idea on why this is done, also how can I stop it?

Thanks

Andrew

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All

For reference this can be configured using the below code:

oModel.setRefreshAfterChange(false);

This stops the refresh from the server after the change.


Thanks

Andrew

Answers (0)