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
- Open the form that you want to be able to open with a pre-determined query
- Click on the Advanced Query button (Ctrl+F3) . It looks like a tornado with a pencil…
- Create the desired ranges and sorts to the tables and fields (Figure 1)
- Click on the ‘Modify…’ button on the upper right hand corner of the advanced query form
- Click on the ‘Save As’ option that appears
- Enter a name to save your advanced query as (e.g., Group 20 View in Figure 2) and click ok.
- 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
- Verify that the form shows the newly queried data. If the data is not showing up as expected, check your query again.
- The form can now be closed.
Part 2 – Create a Favorite with a saved query associated
- Find the form in the AX Navigation Bar that the saved query was just created from (in my example, it is the Customer Details).
- Right click on the form in the Nav Bar and select ‘Add to favorites’.
- Provide a name for the shortcut in the favorites in the ‘Name’ field.
- Select the appropriately saved query in the ‘Query’ field (e.g., ‘Group 20 view’ that was created in step 6 above)
- 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.
- When the new custom ‘Favorites’ short cut is clicked on, the target form will open with the appropriate associated query executed on that form
- That is it. Enjoy!