The Blue Horseshoe Blog

How to open a form with a preset filter in Microsoft Dynamics AX 2009

Posted by Blue Horseshoe on Jul 21, 2011 9:26:32 AM

Sometimes key users are only interested in certain collections of records in a given form in Dynamics AX.  For example, one user may only be in charge of creating and maintaining ‘corporate’ type customers (in this example, customer group field value of 20 identifies customers are corporate).

Dynamics AX will allow the users to customize the appearance and layout of an AX form via Intellimorph but this feature will not allow for the automatic filtering of data.  To accomplish this, the favorites feature is required to achieve this functionality and provide these users with an easy way to access their forms with these filters automatically applied.

Creating a form that will open with a pre-determined query is not hard to do once you know how to do it.  I broke it out into two parts: Create the query and then create a shortcut to this form with that query.  This little tutorial should help you out.  Hope it helps!

Part 1 – Create and save an advanced filter

    1. Open the form that you want to be able to open with a pre-determined query
    2. Click on the Advanced Query button (Ctrl+F3) .  It looks like a tornado with a pencil…
    3. Create the desired ranges and sorts to the tables and fields (Figure 1)
      Figure 1-Dynamics AX will allow the users to customize the appearance and layout of an AX form via Intellimorph but this feature will not allow for the automatic filtering of data.
    4. Click on the ‘Modify…’ button on the upper right hand corner of the advanced query form
    5. Click on the ‘Save As’ option that appears
    6. Enter a name to save your advanced query as (e.g., Group 20 View in Figure 2) and click ok.
      Figure 2 – Name your saved query appropriately
    7. Make sure that the ‘Select query’ on the advanced query form is showing the value of the save query from step 6 above.  Click OK
    8. Verify that the form shows the newly queried data.  If the data is not showing up as expected, check your query again.
    9. The form can now be closed.

Part 2 – Create a Favorite with a saved query associated

  1. Find the form in the AX Navigation Bar that the saved query was just created from (in my example, it is the Customer Details).
  2. Right click on the form in the Nav Bar and select ‘Add to favorites’.
  3. Provide a name for the shortcut in the favorites in the ‘Name’ field.
  4. Select the appropriately saved query in the ‘Query’ field (e.g., ‘Group 20 view’ that was created in step 6 above)
    Figure 4 – Create a favorite from a form and select the saved query that you want to associate with the favorite. Give the favorite a custom name.
  5. Click the Ok button unless you would like to select a location to create the favorite in.  I will not go into detail on this step but it is a great way to organize favorites.
  6. When the new custom ‘Favorites’ short cut is clicked on, the target form will open with the appropriate associated query executed on that form
    Figure 5 – When the pre-saved form is clicked, the target form will open with the query automatically being applied
  7. That is it.  Enjoy!

Tags: Dynamics AX 2009, Learning

Something Powerful

Tell The Reader More

The headline and subheader tells us what you're offering, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.


  • Bullets are great
  • For spelling out benefits and
  • Turning visitors into leads.

Subscribe to Email Updates

Recent Posts