We meet a problems when using the method Dialogs.shell() from report. When the method is invoked directly like this
Dialogs.shell("myFile.txt");
- if the script is run in debug mode from script editor we get error "Script: , line -1", but the file is opened successfuly (see the attached image);
- if the script is run normally from Explorer, the file is opened, but BPA client hangs and has to be restarted forcefully.
If we show Message Box before invoking Dialogs.shell(), the file is opened and the report completes without problems:
var btnPressed = Dialogs.MsgBox("Do you want to get the file?", (Constants.MSGBOX_ICON_QUESTION | Constants.MSGBOX_BTN_YESNO)+256, "Get files locally?"); if (btnPressed==Constants.MSGBOX_RESULT_YES) { Dialogs.shell("myFile.txt"); }
Is this an intended behavior of Dialog.shell(). If not - is there a fix for it?
Thank you!
Simeon