Search code examples
axaptadynamics-ax-2012x++dynamics-ax-2012-r2dynamics-ax-2012-r3

Drop dialog on a list page not disappearing automatically


When I add a drop-dialog to a list page, the drop dialog drops down when I click on it, but does not disappear when I click somewhere else.

I am trying to add my own drop-dialog, but I can reproduce this issue with standard Dynamics AX objects. I guess I am just missing some property on an object, but I just cannot figure out which one.

If you want to reproduce my problem in order to solve it, do the following:

  1. Create a new Form. (Form 1)
  2. Change the FormTemplate property to ListPage (Click on Yes)
  3. Add the query MainAccountListPage to the DataSources
  4. Create an ActionPanTab.
  5. Add a Drop-dialog button with the menu item MainAccountListPageBalanceParameters.
  6. Save and open the new List page by right clicking and choosing open. (or open the menu item)

In my case, when I click on Parameters, the drop dialog drops down. When I then click outside the drop-dialog, it disappears as it should.

enter image description here

  1. Create a new display menu item. Set the object to the new list page (Form 1)
  2. Drag the Menu item to any menu. I added mine to General ledger (Common) enter image description here

  3. Restore, open new workspace. Click on the new menu item in the general ledger menu.

enter image description here

  1. Click on “parameters” and click outside the drop dialog.

When I do this the drop dialog does not disappear again. You can see this same drop dialog working fine on the Main Accounts list page. I have tried changing properties on both menu items, on the menu, on the form etc. I have tried different drop dialogs and different list pages. It always works on the details page and when opened from the AOT.

Am I missing a property? Is the entire way I am adding the drop dialog wrong?


Solution

  • The answer to the above example is.. add the MainAccountDetailPart Form part to the list page's (Form1) Parts.

    With my other example, EcoResProductPerCompanyListPage, I had to add the EcoResProductVariantsPerCompanyFactBox to Parts.

    I have no idea why this is, but adding a part to a list page fixes the drop dialogs. For example, adding MainAccountDetailPart Form part to a new list page not only fixes the MainAccountListPageBalanceParameters in my example, but it also fixes any other drop dialog that previously did not want to close. Removing the part the breaks all the drop dialogs in the list page again.

    Thanks, FH-Inway, for the suggestion, I would have never have found the answer without your method. The solution really surprised me!