Forum Discussion
And When I directly cancel the new popup it executes the same behaviour so the code inside the callback is not a problem I believe.I have tried the approach as the article suggested but it leads to the same result.I have reduced code to a minimum in callback.It looks like this now:
Oh I haven´t seen that you open the pop-up from the other pop-up! Does anything work when you call you own pop-up from a regular position in the Form?
If yes, than you interfere with the other popup. I assume you have a "close dialog" function somewhere. But it doesn´t closes your dialog, but the Aras one. In this case your callback is bypassed.
As far as I remember you have to explicitly close your dialog within the callback:
topWindow.ArasModules.Dialog.show('iframe', params).promise.then(function(res) {
parent.args.dialog.close();
- NOOB4 years agoIdeator I
How can a callback be called if the dialog doesn't close first?I tried your way but it does not go to the callback if we remove dialog.close() on save changes button which I have on my popup.I have tried adding a check on the formId of the dialog if it matches than only close it but it is also of no use.
- NOOB4 years agoIdeator I
I have tried using a different form on the click of a button the results are same.On a regular form it behaves accordingly.
- AngelaIp4 years agoIdeator I
Hi,
out of interest I made a quick test by myself and it just worked fine. I used a standard Form call:
Setup like this:
Used code:
var topWnd = aras.getMostTopWindowWithAras(window);
topWnd = topWnd.main || topWnd;// Get form params
var params = {
title: 'Do something',
formId: "30A3Exxxx",
aras: aras,
dialogWidth: 1200, // set width int
dialogHeight: 600, // set height int
content: 'ShowFormAsADialog.html'
};// Logic performed when dialog is closed
var callback = function(res)
{
if(!res) // user closed dialog
{
aras.AlertWarning("Aborted");
return;
}
return aras.AlertSuccess("Something was finished: " + res);
};// Call form in dialog
topWnd.ArasModules.MaximazableDialog.show("iframe", params).promise.then(callback);- AngelaIp4 years agoIdeator I
My previous post referred to a some other use case of mine where I used multiple intersecting dialogs. In this case Innovator mixed up the callbacks cause I had overwritten the top window with another top window. Seems not be a problem here..