Walkthrough: Adding Actions to a Customer List Page

In this walkthrough, you will learn how to add a new Action menu item and then display that item as an icon on the Action Pane. The Action Pane is located at the top of most pages and is used to provide end users with easy access to common or important actions. Action menu items are referred to as actions. Actions that are displayed on the Action pane are referred to as promoted actions.

This walkthrough provides an overview of how to create and run a simple list page in Microsoft Dynamics NAV 2009, and demonstrates how to:

  • Add an action to the customer list page to create a new sales order.

  • Display the Sales Order action on the Actions menu.

  • Promote the Sales Order action so it is displayed in the Action pane.

  • Modify the Sales Order action so it creates a new sales order for the customer currently selected in the customer list.


This walkthrough builds on the steps described in Walkthrough: Creating a Customer List in Page Designer.

Simon shows the customer list page that he created to Kevin, the Sales Manager at CRONUS International Ltd. who contracted him to create this page. Kevin likes how the customer list looks, but he would like Simon to add a menu item on the Actions menu to create a new sales order for the currently selected customer.

Simon looks at the customer list that he created earlier and adds a new action to the page to create a sales order.

To add an action to the customer list page

  1. In the Classic client, click Tools, and then click Object Designer.

  2. In Object Designer, click Page, select page 50000 Kevin's Customer List, and then click Design.

    The Kevin's Customer List page opens in Page Designer.

  3. Select the first empty line on the page, which is located immediately below the <Phone No.> field.

  4. With this line selected, on the View menu, click Actions.

    Action Designer opens. For this walkthrough, Action Designer will be used to set actions on the page.

  5. In Action Designer, click the Name column in the first row and type CustomerListActions.

    The relevant ActionContainers for a list page are:

    • NewDocumentItems

    • ActionItems

    • RelatedInformation

    • Reports

    • HomeItems

    • ActivityButtons

    For more information about the different types of actions, see Actions Overview.

  6. Set the SubType to a value of ActionItems.

    Actions with a SubType of ActionItems are displayed on the Action menu just above the Place section.

  7. Click the Caption column in the second row and type Sales Order.

  8. Set the Type to Action.

  9. Click the third row and then click the second row. The remaining action columns are automatically filled in.

    This action is indented one level below the ActionContainer to indicate that it is a child of (contained by) the ActionContainer.

  10. Open the Properties window.

  11. Set the RunObject property to Page Sales Order.

  12. Save the page.

  13. To run the page, in Page Designer, select the page 5000 Kevin's Customer List, and then click Run.

    The Sales Order action now displays in the Actions menu.

When Simon opens the page, he realizes that he would like to promote the Sales Order action so that it displays on the Action pane in the New category. Promoted actions are displayed as icons within the Action pane located at the top of the page.

To promote an action

  1. With the first empty line selected in Page Designer, open Action Designer.

  2. Select the Sales Order action and view the Properties window.

  3. Set the Image property to Document.

  4. Set the Promoted property to Yes.

  5. Set PromotedCategory property to New.

  6. Set PromotedIsBig property to Yes.

  7. Set the Caption property to S&ales Order.

    The ampersand identifies the access key for this menu item. The access key is automatically set to the first letter in the caption by the client if another access key is not set using the ampersand.

  8. Save the page.

  9. Run the page.

    The Sales Order command is now displayed in the Action Pane, as shown in the following screen shot.


Simon verifies that the Sales Order action now displays in the Action pane. However, when he selects the Sales Order action, the Sales Order card opens and displays the first sales order in the database. Simon remembers that Kevin asked him to have the Sales Order action open a new sales order for the currently selected customer, instead. Simon opens the customer list page and starts making this change.

To add an action

  1. In Action Designer, select the Sales Order action and view the Properties window.

  2. Set the RunFormMode property to Create.

    The default value for this property is Edit. By setting this property to a value of Create, a sales order page will open in create mode, enabling the end user to create a new sales order.

  3. Set the RunFormLink property value to Sell-to Customer No.=FIELD(No.) using the following steps:

    1. In the RunFormLink property value, click the Assist-Edit button (ellipsis).

      The Table Filter window appears.

    2. Click the AssistButton in the Field cell, click Sell-to Customer No., and then click OK.

    3. Click the drop-down list box in the Type cell and then click FIELD.

    4. Click the AssistButton in the Value cell, click No., and then click OK.

    5. Click OK.

      The customer number in the customer list is now linked to the Sell-to Customer number in the sales order. This means that when the Sales Order action is clicked, a new sales order will be created for the customer that is currently selected in the customer list.

  4. Save the page.

  5. Run the page.

    To test the new functionality, select a customer from the list and then click the Sales Order action. A new sales order appears. Press the TAB key twice, or click any field on the page for customer information to populate the fields.

Next, Simon will add a FactBox to the customer list page. Simon will use this FactBox to display additional information about the currently selected customer in the list.

Community Additions