Share via


Walkthrough: Creating a Secondary List Page

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

A secondary list page displays a subset of records from an existing primary list page. To demonstrate the steps to create a secondary list page, this walkthrough uses the Application Object Tree (AOT) to build a secondary list page based on the Customers list page. The secondary list page displays customers who have a credit limit.

This walkthrough illustrates the following tasks:

  • Creating a secondary list page query that is based on the data source of the primary list page.

  • Creating a menu item that associates a query with a list page form.

  • Adding a secondary list page to the Navigation Pane and to an area page.

Prerequisites

To complete this walkthrough, you will need:

  • Microsoft Dynamics AX.

  • A license file that includes access to the MorphX development environment.

  • Sample data in the CustTable database table of a company that you can access.

Creating a Secondary List Page Query

In this section, you create a query that retrieves customers who have a credit limit. The query has to include all the data fields that the list page form requires. To make sure the query includes the necessary fields, you will create a copy of the original query, and add a range restriction to it.

To create the query

  1. In the AOT, expand the Queries node, right-click CustTableListPage, and then click Duplicate. A new query named CopyOfCustTableListPage is added to the Queries node.

    Note

    You can also use a composite query to create the query for the secondary list page. You can add a range to the composite query that specifies the records to include in the secondary list page. For more information about how to create a composite query, see Query Reuse by Composite Queries.

  2. Click CopyOfCustTableListPage, and then display its properties. In the Properties window, enter CustTableCreditLimitListPage for the Name property.

  3. Expand the CustTableCreditLimitListPage query, expand Data Sources, expand CustTable, right-click Ranges, and then click New Range. A range node is added to the query.

  4. Click the range node, and then use the Properties window to specify values for the following properties.

    Property

    Value

    Field

    CreditMax

    Value

    >0

  5. Right-click the CustTableCreditLimitListPage query, and then click Save.

Creating a Menu Item

Next, create a menu item for the CustTableCreditLimitListPage. You use the menu item to associate the query with the CustTableListPage form.

To create the menu item

  1. In the AOT, expand Menu Items, right-click Display, and then click New Menu Item. A new menu item is added to the Display node.

  2. Click the new menu item, and then use the Properties window to specify values for the following properties.

    Property

    Value

    Label

    Customers with Credit Limits

    Name

    CustTableCreditLimitListPage

    Object

    CustTableListPage

    ObjectType

    Form

    Query

    CustTableCreditLimitListPage

  3. In the AOT, right-click the CustTableCreditLimitListPage menu item, and then click Save.

To view the secondary list page, right-click the menu item, and then click Open.

Adding the Secondary List Page to the Navigation Pane

In this section, you add the CustTableCreditLimitListPage menu item to the Customers menu. This adds the menu item to the Navigation Pane and to the area page of the Accounts Receivable module.

To add the menu item to the menu

  1. Expand the Menus node, expand AccountsReceivable, expand Common, right-click Customers, click New, and then click Menu Item. A menu item is added to the Customers node.

  2. Click the new menu item, and then use Properties window to specify values for the following properties.

    Property

    Value

    MenuItemName

    CustTableCreditLimitListPage

    IsDisplayedInContentArea

    Yes

  3. Right-click the AccountsReceivable menu, and then click Save.

To view the new menu item in the Navigation Pane and area page, you have to restart the client application.

See also

List Page Overview

How to: Add a List Page to the Navigation Pane

Menus and Menu Items

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.