Lab - Extend a form and add controls
Read this first - before you start the lab!
For this lab, you CANNOT sign in with your own credentials. Use the following steps to sign in to your lab environment with the correct credentials.
Ensure that you are signed in to Microsoft Learn.
Select Launch VM mode or Sign in to launch VM mode in this unit.
In the Resources tab on the lab side bar, select the T icon next to Password in the MININT box, to have the administrator password for the Virtual Machine entered for you.
Microsoft Edge will open automatically. Wait for it to navigate to the Sign in page for finance and operations.
On the Microsoft Sign in page in finance and operations, insert your mouse cursor into the Username field.
On the Resources tab of the lab side bar, below the Azure portal heading, select the T icon next to Username, then press Enter.
Your mouse cursor will now be in the Password page.
On the Resources tab of the lab side bar, below the Azure portal heading, select the T icon next to select Password, then press Enter.
Don't stay signed in, or store the password on the virtual machine.
To see the lab instructions, select the Instructions tab on the lab side bar.
You can now begin your work on this lab.
The finance and operations apps developer has been asked by the Fleet Management company to adjust the appearance and functionality of the Customers page in the Fleet management module. To speed up internal processes, the company wants a tab added to the Action Pane with a button that links to the page so they can enter a free text invoice.
Create a new project
- Minimize the Microsoft Edge window.
- Open Visual Studio.
- Select Yes in the Do you want to allow this app to make changes to your device? Window
- Select Continue without code to open the Visual Studio.
- Go to Dynamics 365 in the Extensions menu in the ribbon in Visual Studio.
- Select Model management > Update model parameters.
- Select the Fleet Management Model name from the model drop-down list.
- Select Next.
- Ensure the following models are referenced by selecting the checkmark next to the model:
- Application Suite
- Application Foundation
- Application Common
- Application Platform
- Contact Person
- General Ledger
- Select Next.
- Select Finish.
- Open the File menu and select New > Project.
- Ensure that Finance Operations is selected in the left pane, and then select Next.
- In the Configure your new project dialog box enter FleetManagementFormProject in the Project name field.
- Select Create.
- Open Dynamics 365 in the Extensions menu.
- Select Options.
- Under the Dynamics 365 node on the left pane, select Projects.
- Select the check boxes for Organize projects by element type and Synchronize database on build for newly created project.
- Select OK.
Extend the FMCustomer form
- In the search bar, in the Application Explorer window, expand the AOT > User Interface > Forms nodes.
- Select the FMCustomer form.
- Right-click the FMCustomer form and select Create extension. An element named FMCustomer.FleetManagement will be added to your FleetManagementFormProject in the Solution Explorer window.
- Rename the object FMCustomer.Extension.
- Double-click the FMCustomer.Extension form in the Solution Explorer window to open it in the form designer window.
- Select Save in the ribbon to save your progress.
Add a tab, button group, and button to the Action Pane control
- On the right Design pane of the form designer, right-click the ApplicationBar (Action Pane) control.
- Select New > Action Pane Tab. A new control has been added named FormActionPaneTabControl1 (Action Pane Tab).
- Select the FormActionPaneTabControl1 (Action Pane Tab) heading.
- In the Properties window, enter InvoicingTab for the Name property and Invoicing for the Caption property.
- On the Design pane, right-click the InvoicingTab (Action Pane Tab) control and select New Button Group.
- Select the FormButtonGroupControl1 (Button Group) heading.
- In the Properties window, enter CustomersButtonGroup for the Name property and Customers for the Caption property.
- On the Design pane, right-click the CustomersButtonGroup (Button Group) control and select New > Menu Item Button.
- In the Properties window, for the Menu Item Name property, select CustFreeInvoiceNew from the drop-down list.
- Right-click the FMCustomer.Extension form in the Solution Explorer window.
- Select Set as Startup Object.
- Perform a build by right-clicking FleetManagementFormProject in the Solution Explorer window and then selecting Build.
- Run your form to view it in a browser window by selecting Debug > Start Without Debugging from the ribbon. You can also use Ctrl + F5.
- In the browser window, select the INVOICING tab on the Action Pane and then select Free text invoice. You should be taken to the page to enter a free text invoice for the selected customer in the FMCustomer.Extension page.
Now close the lab environment
- Select the Next button in the bottom-right corner of the side bar.
- Select Leave in the pop-up window that appears.
Need help? See our troubleshooting guide or provide specific feedback by reporting an issue.