Export (0) Print
Expand All

Walkthrough: Creating a Wizard Page

Microsoft Dynamics Nav 2009

In Microsoft Dynamics NAV you can use the Navigate page type to create a wizard page. A wizard page consists of a number of user input screens or steps linked together, enabling users to carry out infrequently performed tasks, such as configuration or specific business tasks.

In Microsoft Dynamics NAV, examples of wizard pages include:

  • Create Interaction, page 5077

  • Create To-do, page 5097

  • Create Opportunity, page 5126

In Microsoft Dynamics NAV, Benjamin, the marketing manager, wants to find an easy way to create To-dos for his salespeople. By using the Navigate page type you can make this task easier for him by breaking it down into smaller, more manageable steps.

NoteNote

In Microsoft Dynamics NAV, the Navigate page type is also used for page 344, Navigate.

This walkthrough provides an overview of how to create the basic elements in a To-do wizard page using Page Designer.

This walkthrough illustrates the following tasks:

  • Creating a wizard page

  • Adding steps to a wizard page

  • Adding the attendee subform

  • Adding wizard buttons

  • Running the page

Prerequisites

To complete this walkthrough, you will need:

  • Microsoft Dynamics NAV 2009 installed with a developer license

Simon is a partner working for CRONUS International Ltd.. Benjamin, the marketing manager at CRONUS, wants Simon to create a wizard page that will enable him to create To-dos for his team of salespeople. Simon must create a wizard page that makes it easy to link a To-do with a sales campaign or sales opportunity. Simon knows that he can do this successfully if he uses the Navigate page type to create a To-do wizard.

Simon must first create a new wizard page in Page Designer.

NoteNote

In this walkthrough, to learn about the properties and controls of a wizard page, you will create a wizard page from a blank page. If you are running Microsoft Dynamics NAV 2009 SP1, Object Designer also includes a wizard that you can use to create a wizard page that sets up many properties and controls for you. For more information about the wizard, see How to: Create a Page.

To create a wizard page

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Page, and then click New. The New Page dialog box appears.

  3. In the Table text box, click the AssistButton, select the table 5080 To-do, and then click OK.

  4. Click Create blank page, and then click OK.

    The new page appears in Page Designer.

  5. In the Name field of the first row, which has the type Container and the subtype ContentArea, type Ben's To-dos.

  6. Select a blank row, and on the View menu, click Properties.

  7. Locate the PageType property, and then set the Value field to the page type NavigatePage.

  8. Close the Properties window.

  9. Close the Page Designer window. In the Save As dialog box, type Ben's To-dos and enter a page ID, for example, 50015.

You have successfully created and saved a Navigate page, which you will use to create a To-do wizard. Next you must add steps to the wizard.

In a wizard page, steps are controls that you place on a Navigate page to enable it to work like a wizard. These controls initially appear as tabs in the content area of the page. Simon can create steps in Page Designer by adding a different group element for each step that he wants to create. Each control is displayed as a separate step to the user. The following procedure shows how to create the first step in a To-do wizard that has four steps.

To add steps to a wizard page

  1. Open your new wizard page, 50015 in Page Designer.

  2. In the second row, type Step1 in the Name field. Set Type to Group and SubType to Group.

  3. In the next empty row, leave the Name field blank and set Type to Field.

  4. On the View menu, click Field Menu.

    In the Field Menu window, select fields from the table 5080 To-do.

  5. Make your selection by holding down the CTRL key while you click the following fields:

    • Type

    • Date

    • Description

    • Start time

    • Duration

    • Team To-do

    • All Day Event

    • Ending Date

    • Ending Time

  6. Click OK. A message box displays the following message, "Do you want to add the fields that are selected in the field menu?" Click Yes.

    If the OK and Cancel buttons are unavailable, see Page Designer Troubleshooting for more information.

  7. In the caption field for each of the fields you added, type the following captions:

    • What is the type of the to-do?

    • What is the starting date of the to-do?

    • Describe your to-do

    • What is the start time of the to-do?

    • What is the duration of the to-do?

    • Team to-do

    • All Day Event

    • What is the end date of the to-do?

    • What is the end time of the to-do?

    All the fields that you add must be indented one space below Step 1. Remember to check indentation on all elements that you create, and adjust with the left and right arrows if necessary.

  8. When you have added all the necessary steps, close the Page Designer, and save your page.

    In the RoleTailored client, each step is displayed like a tab control until you add Back, Next, and Finish buttons to the lower part of the page.

When Ben opens his new wizard page for the first time, he wants to be able to choose a salesperson to create a To-do for. Simon must add a control to Step 1 of the wizard, which allows him to select attendees from table 5080, Attendees.

To add the attendee subform

  1. Open your new wizard page, 50015 in Page Designer.

  2. Select the next available row below Step1. Right click, and click New to insert a new row.

  3. Type AttendeeSubForm in the Name field, this row should be indented to match the other field elements in the Step 1 group. Set Type to Part.

  4. Click View, and then click Properties to open the Properties window. Set the PagePartID property to Attendee Wizard SubForm. This will ensure that Ben can select attendees for his To-dos in the first step of the wizard.

  5. Close and save your page. Preview your changes in the RoleTailored client.

    The following illustration shows the indentation of elements on the wizard page after adding steps and the attendee subform.

    Dd301394.Local_-866505901_nav_navigatepageelements(en-us,NAV.60).gif
NoteNote

There a number of other variables, constants, and functions that you must define in C/AL Globals before this control can be fully functional. Instructions on how to add these is beyond the scope of this walkthrough.

Simon has now successfully created a basic wizard page. To make his page appear more like a wizard he must add Next, Back, and Finish buttons. To do this, Simon must add a new set of actions to his wizard page using the Action Designer.

To add wizard buttons

  1. Open your new wizard page 50015, in Page Designer.

  2. Select the first empty row below the steps that you have already created. Click View, and then click Actions to open Action Designer.

  3. On the first empty row in Action Designer, set Type to ActionContainer and SubType to ActionItems.

  4. In the next available row, type Back in the Name field, and set Type to Action. Do the same in the next two available rows except enter Next and Finish in the Name fields. When you have added all the buttons you need, select the row with the Back button control, and open the Properties window.

  5. In the Properties window, set the following properties on the Back button.

    Property Value

    Enabled

    BackEnable

    Visible

    True

    RunFormMode

    Edit

    InFooterBar

    Yes

  6. Save and compile your page.

Test your new wizard page in the RoleTailored client.

To run the page

  • In Page Designer, select page Ben's To-dos, and then click Run.

    The RoleTailored client opens and displays the new wizard page.

Simon has now created a basic wizard page. He must remember to add the variables, constants, and functions necessary to make the wizard page function correctly. He would also like to add a promoted action called 'Find' to Step 1 of the wizard, to help Ben to search for attendees.

For more information about adding variables, constants, and functions, see Developing Codeunits.

Community Additions

ADD
Show:
© 2014 Microsoft