Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3257

How to call another function on Omodel create success

$
0
0

Is it possible to call another function on success of OModel create success? I am trying like below code in a view1.controller.js

 

oModel.create('/EntitySet', requestBody, {  success: function(oData, oResponse) {  sap.m.MessageToast.show("Success");
this.mynewfunction();
},  error: function(oError) {  sap.m.MessageToast.show(" error");  }
mynewfunction: function() {
alert("function triggered")
}

The success toast appears , but facing this.mynewfunction is not a function error.


Viewing all articles
Browse latest Browse all 3257

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>