I am declaring messageBox inside Controller. I want to use global variable inside onClose Method.
I have tried to pass it inside onClose method as parameter
var that =this;
sap.m.MessageBox.show(
"Notification " + odata.EvNotificationNo + " has been saved" + attachment_message,
{
icon: sap.m.MessageBox.Icon.SUCCESS,
title: "Success",
actions: [
"Go to Notification Processing",
sap.m.MessageBox.Action.OK,
sap.m.MessageBox.Action.CANCEL
],
onClose: function (sAction) {
//Here I have use var that
}
}
);
I want to use that variable inside onClose method