this.closeDoc(true) will close the current document without prompting to
You can't exit the application completely, though.
I am getting below error:
TypeError: this.closeDoc is not a function([object ADMDialog])@Page:Open:23
I am trying to close document on Cancel event of pop. If I try executing this.closeDoc(true) it works while in Cancel event, it is not working.
That's because inside a dialog the "this" object is not pointing to the
currently opened document. A better way of doing it would be to check the
return value of the dialog, and if it's "cancel", then you close the doc.
I can trigger event; when I put app.alert in cancel event it show mw alert. Please let me know how can I get correct reference of my document though it will not work with this
That's because the "this" object doesn't refer to the document inside of a
dialog. You need to pass a reference to the document into the dialog or use
an external reference.
Can you please advise me how to get referece of current document?or Should I create new question for it?
Define a variable outside of the dialog, for example:
var myDoc = this;
Then inside the dialog you can access myDoc as the currently opened