Lab - Create a form
Read this first - before you start the lab!
Important
For this lab, you CAN'T sign in with your own credentials. Use the following steps to sign in to your lab environment with the correct credentials.
- Ensure that you're 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 Finance and Operations box, to have the administrator password for the Virtual Machine (VM) entered for you.
- Select Enter.
- Microsoft Edge opens. Wait for it to navigate to the Sign in page for finance and operations. If you experience an issue with the Sign in page loading, try to restart the browser in the VM.
- On the Microsoft Sign in page in finance and operations, place 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 is now 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.
- In the Save password window, select Never.
- Select Accept in the Permissions requested page.
- To see the lab instructions, select the Instructions tab on the lab side bar.
You can now begin your work on this lab.
Scenario
The finance and operations apps developer has been asked to create a new form
for the Fleet Management company. The company wants a simple page to
enter customer information. They want the form to pull fields from
the CustTable
element.
Create a new project
- Close Microsoft Edge, and finance and operations in the Lab environment.
- Right-click Visual Studio and select Run as administrator.
- Select Continue without code.
- To ensure the correct applications suite is referenced, select Dynamics 365 in the Extensions menu.
- Select Model management > Update model parameters.
- In the Model name field select Fleet Management.
- Select Next.
- Select the following models, by selecting the checkmark next to the model. Any models that are already selected should remain selected.
- ApplicationCommon
- ApplicationFoundation
- ApplicationPlatform
- ApplicationSuite
- ContactPerson
- Currency
- GeneralLedger
- Ledger
- Personnel
- Retail
- Tax
- Select Next until the form closes.
- Open the File menu and select New > Project.
- In the Create a new project dialog box, if you don't see Finance Operations in the Recent project templates list, search for it, and then select Next.
- In the Configure your new project dialog box, enter FleetManagementFormProject in the Project name field.
- Select Create.
- To ensure the correct applications suite is referenced, select Dynamics 365 in the Extensions menu.
- Select Options.
- Under the Dynamics 365 node on the left pane, select Projects.
- Ensure that the check boxes for Organize projects by element type and Synchronize database on build for newly created project are selected already. If they are not, then do so.
- Select OK.
Create a form
- In the Solution Explorer window, right-click the project FleetManagementFormProject (ISV).
- Select Add > New Item.
- Under Dynamics 365 Items select User Interface.
- On the middle pane, select Form.
- Enter FleetCustomersForm in the Name field.
- Select Add. The FleetCustomersForm form will now open in the form designer window.
Add a pattern and data source to the form
- In the form designer window, right-click the Design node of the Simple List on the right pane.
- Select Apply pattern > Simple List.
- On the left pane of the form designer window, right-click the Data Sources node.
- Select New Data Source.
- With the new item DataSource1 selected, right-click and select Properties.
- In the Properties window in the bottom right of the screen, select CustTable from the drop-down menu, or simply type it in for the Table property,.
- Select the Save icon in the ribbon.
Build the simple list form pattern
- Click in the bottom Pattern pane of the form designer. You need an ActionPane, Group, and Grid to complete the form pattern.
- On the right pane of the form designer, right-click the Design of the Simple List node .
- Select New > Action Pane.
- With the new Action Pane node selected, go to the Properties window and change the Name property to ActionPane.
- Collapse the ActionPane node to keep the right pane of the design node simplified.
- Select Save.
- Right-click the Design node of the Simple List on the right pane of the form designer.
- Select New > Group.
- With the new group selected, go to the Properties window and change the Name property to Filters.
- Select Save.
- Right-click the Filters node on the right pane of the form designer.
- Select Apply pattern > Custom and Quick Filters.
- Right-click the Filters node on the right pane of the form designer again.
- Select New > QuickFilter.
- With the new QuickFilter selected, go to the Properties window and change the Name property to QuickFilter.
- On the right pane of the form designer, collapse the Filters node.
- Select Save.
- Right-click the main Design node on the right pane of the form designer.
- Select New > Grid.
- With the new Grid selected, change the Name property in the Properties window to MainGrid.
- On the left pane of the form designer, under the Data Sources node, and under the CustTable node, expand the Fields node.
- Select and drag the Party, SalesGroup, CustGroup, and AccountNum fields from the Fields node onto the MainGrid node on the right pane.
- Select Save.
- Perform a build by right-clicking the project FleetManagementFormProject (ISV) in the Solution Explorer window and then selecting Build.
Preview the form in a browser
- After the build is completed without errors, right-click the form FleetCustomersForm in the Solution Explorer window.
- Select Set as Startup Object.
- Select Ctrl + F5 or select Start in the ribbon to begin running the project. Microsoft Edge will open to display the newly created form (this can take a couple of minutes).
- Add a few records to the form by selecting the New button in the Action Pane.
Close the lab environment
- Select Done in the Instructions pane in the lab side bar.
- In the Lab is complete window, select Continue, and then select Leave to return to the next unit in the module.