I have been trying to acquire the returned value from the function into another function. Can you please help me out?
updateArticleSeqNumber: function() {
var articleSequenceId;
var spreadObj = this.moveSpreadDetailDlg.getModel().getData();
var entityName = "/PIMArticleSequenceSet(Name='" + encodeURIComponent(this.oCurrentScenario.Name) + "',Template='" + encodeURIComponent(this.oCurrentScenario.Template) + "',Region='" + this.oCurrentScenario.Region + "',Article='"+spreadObj.Article+"',Spread='" + spreadObj.Spread + "',PimPage='" + spreadObj.ArticleMoveTo + "')";
sap.ui.getCore().getModel().read(entityName,{
async: true,
success: jQuery.proxy(function (oData) {
articleSequenceId = oData.ArticleSequenceId;
articleSequenceId+=1;
})
});
return articleSequenceId;
}
The returned value is articleSequenceId
.
The another function I need to use that is
saveSpreadDetailMoveChange: function() {
var updateArticleSeqId= this.updateArticleSeqNumber();
}
I am not getting the value in updateArticleSeqId
.
Please point me in the right direction.