Doens.be

  • Linkedin flickr twitter delicious Facebook Youtube

Dialog Extended

One of my colleagues (Koen Dedecker) was looking for a way to prevent user interaction with other forms while a certain dialog is shown. After some research he found the solution on the blog Dynamics AX tools and tutorials from Vanya Kashperuk. A few years ago (2007) he made a simple extension of the dialog class that makes this possible. You can find more information and download some code samples on http://kashperuk.blogspot.com/2007/06/3-dialog-extensions.html.

The trick is actually simple:

  • Create a new variable of the type Boolean en the classDeclaration of the Dialog-class
  • Create a public parm method for this new variable to get/set the value
  • Extend the wait-method by placing the following code before the close-statement:
    dialogform.formRun().wait(this.parmShowModal());

Now when you make a new instance of the dialog class just set the value of the parmShowModal() to true. From now on this dialog will stay on top.

Tags: , , , , ,

Leave a Reply