Build navigation
In this tutorial, you will add navigational elements to a workspace and the navigation pane.
Prerequisites
For this tutorial, you need to access the environment using Remote Desktop, and be provisioned as an administrator on the instance. For more information, see Access Instances.
Key concepts
- A workspace is an overview page that is specific to a particular subject area. Workspaces are common to all users. In this tutorial, you will add content into an existing workspace.
- The dashboard is the default home page for each user.
- Tiles are securable objects that can be shown on a workspace or the dashboard. They can be secured by using menu items.
Setup
If this is the first tutorial that you are working on, review Access Instances and make sure that you provision your administrator user if you are working on a local VM.
Import the tutorial project
If you have already imported the Fleet management tutorial project, skip to the next section.
- Download the Fleet Management sample from https://github.com/Microsoft/FMLab, save it to C:\, and unzip it.
- In Visual Studio, on the Finance and operations menu, click Import Project.
- In the Import Project window, next to the Filename text box, click the ellipsis button.
- In the Select the file to import window, browse to C:\FMLab, click FMTutorialDataModel.axpp, and then click Open.
- In the Project file location text box, enter C:\FMLab.
- Select the Overwrite Elements option, and then click OK.
Import transactional data
- In Visual Studio, open the FMTutorial project. On the File menu, point to Open, and then click Project/Solution.
- In the Open Project dialog box, browse to C:\FMLab\FMTutorial, and then click FMTutorial. Click Open. The FMTutorial project appears in Solution Explorer.
- Use the FMTDataHelper class to load data for the Fleet Management tutorial. In Solution Explorer, in the FMTutorial project, expand Classes, right-click FMTDataHelper, and then click Set as Startup Object.
- From the BUILD menu, click Rebuild Solution. You use the rebuild to update the timestamps of the imported artifacts. You can view the build progress in the Output window.
- Press Ctrl+F5 to run the project and load the data.
Add a tile to the tutorial workspace
First, we will add a new tile to the form FMTClerkWorkspace.
In Solution Explorer, expand Forms and then double-click FMTClerkWorkspace.
In the designer, expand PanoramaBody.
Right-click TileContainer, and then click New > Tile Button.
Specify the following properties for the new tile button.
Property Value Text Test tile Tile FMTAllCustomersTile This will create a duplicate of the existing All customers tile.
In Solution Explorer, click Forms > FMTClerkWorkspace, right-click, and then select Set as Start-up Object. Setting a start-up object is necessary to allow Visual Studio to launch when you press Ctrl+F5 in step 7. Setting this form as the start-up object will cause the work-in-progress Fleet management clerk workspace to appear after you press Ctrl+F5. We will preview this form again later in detail.
Right-click FMTutorial, and then click Rebuild.
Press Ctrl+F5 to run the project.
After you build and run the project, the Fleet management clerk workspace will launch. The new tile named, Test tile, that you created will be included in the first section of the workspace, at the end of the set of tiles.
Note
The tile will not navigate anywhere when clicked. To enable this, you can define a Menu Item Name on FMTAllCustomersTile, under Tiles in Solution Explorer.
Add a new workspace to the navigation pane
Next, we will add the FMTClerkWorkspace form to the navigation pane. We will do this in two locations:
- The All workspaces list.
- A new item in the area list containing a menu structure that shows the workspace.
Create a menu item that points to the FMTClerkWorkspace workspace
Right-click FMTutorial, point to Add, and then click New Item.
Click AX Artifacts > User Interface > Display Menu Item. In the Name property, enter FMTClerkWorkspace.
Click Add.
Specify the following properties for the new menu item.
Property Value Label Reservation management tutorial Object FMTClerkWorkspace
Create a tile that points to the FMTClerkWorkspace workspace menu item
Right-click FMTutorial, point to Add, and then click New Item.
Click AX Artifacts > User Interface > Tile. In the Name property, enter FMTClerkWorkspace.
Click Add.
Specify the following properties for the new tile.
Property Value MenuItemName FMTClerkWorkspace
Add a menu extension for the navigation pane
In Application Explorer, click User Interface > Menus, right-click NavPaneMenu, and then click Create extension.
In Solution Explorer, double-click NavPaneMenu.Extension.
In the designer, right-click NavPaneMenu.Extension, point to New, and then click Submenu.
Select the new submenu. In the Name property, enter NavPaneMenuFleetTutorial.
In Solution Explorer or Application Explorer, locate the FMTClerkWorkspace tile, and drag it onto the newly created submenu. Click Save.
Right-click FMTutorial, and then click Rebuild.
Press Ctrl+F5 to run the project. After you build and run the project, the navigation pane will contain a link to the new workspace. Open the navigation pane by clicking the navigation pane button (three lines) at the top right of the application window.
When you open the navigation pane, select All workspaces, and scroll down in the list after it opens. You should see the following new Reservation management tutorial workspace in the list.
Add the form to the main menu structure
Now you’ll add a new main menu section that contains a tile that points to the tutorial workspace. You will then add a link to the same form in this section. This will demonstrate the appearance of a non-workspace form link.
In Visual Studio, in Solution Explorer, right-click FMTutorial, point to Add, and then click New Item.
Click AX Artifacts > User Interface > Menu. In the Name property, enter FleetManagementTutorial.
Click Add.
In Solution Explorer, double-click the new menu FleetManagementTutorial if it isn’t already open.
In the properties list, set the Label property to Fleet management tutorial.
In the designer, right-click FleetManagementTutorial, and click New > Submenu.
Specify the following properties for the new submenu.
Property Value Name Workspaces Label Workspaces In Solution Explorer or Application Explorer, locate the FMTClerkWorkspace display menu item and drag it onto the new Workspaces submenu.
In the designer, right-click FleetManagementTutorial, and then click New > Submenu.
Specify the following properties for the new submenu.
Property Value Name Common Label Common In Solution Explorer or Application Explorer, locate the FMTClerkWorkspace display menu item and drag it onto the new Common submenu.
In Application Explorer, click User Interface > Menus > MainMenu. Right-click MainMenu, and then click Create extension.
In Solution Explorer, locate and open the new extension. Select and double-click MainMenu.Extension to open it.
In the designer, right click MainMenu.Extension, point to New, and then click Menu reference.
Specify the following properties for the new menu reference.
Property Value Name FleetManagementTutorial Menu Name FleetManagementTutorial Click Save.
Right-click FMTutorial, and then click Build.
Press Ctrl+F5 to run the project.
Go to the main menu section you just modified. Open the navigation pane and scroll down until you see the new top-level Fleet management tutorial menu. You may need to clear your browser cache by pressing Ctrl+F5.
Click Fleet management tutorial > Workspaces to expand that submenu. Your navigation pane should look like the following.
If you click on the Common submenu, you will see the menu item that you modeled there. You can click either of these links to check that you have set up the references correctly. If you have set up the references correctly, the tutorial workspace you’re working on should open when clicked on.