Lab - Create a table, add fields, and create field groups

Completed

Read this first - before you start the lab!

Important

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.

  1. Ensure that you are signed in to Microsoft Learn.

  2. Select Launch VM mode or Sign in to launch VM mode in this unit.

  3. 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.

    Screenshot of the administrator password.

  4. Select Enter.

  5. Microsoft Edge will open. Wait for it to navigate to the Sign in page for finance and operations.

  6. On the Microsoft Sign in page in finance and operations, place your mouse cursor into the Username field.

  7. On the Resources tab of the lab side bar, below the Azure portal heading, select the T icon next to Username, then press Enter.

    Screenshot of the Username field and the Sign in dialog box that appears.

  8. Your mouse cursor will now be in the Password page.

  9. 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.

    Screenshot of the Password field the Enter password dialog box that appears.

  10. Don't stay signed in or store the password on the virtual machine.

  11. Select Accept in the Permissions requested page.

    Screenshot of the Permissions requested page.

  12. To see the lab instructions, select the Instructions tab on the lab side bar.

You can now begin your work on this lab.

Before you begin

You need to turn off the batch service. Here are the steps to shut off the batch service:

  1. Open the command prompt in the environment and run as administrator.
  2. Select Yes in the Do you want to allow this app to make changes to your device? window.
  3. Type sc queryex DynamicsAxBatch.
  4. Find the PID number.
  5. Then enter "taskkill /f /pid PID number .

Scenario

The finance and operations apps developer has been asked to create a new table for the Fleet Management company. The Fleet Management company needs to collect customer information in a different way than the out-of-the-box All Customers page. They want the table to contain both personal and location data by using existing elements in the AOT.

Create a new project

  1. Minimize the Microsoft Edge window.
  2. Right-click Visual Studio and select Run as administrator.
  3. Select Yes in the Do you want to allow this app to make changes to your device? window.
  4. Select Continue without code.
  5. Open the File menu and select New > Project.
  6. In the New Project dialog box, search for Finance Operations , and then select Next.
  7. In the Configure your new project dialog box, enter FleetManagementProject in the Project name field.
  8. Select Create.
  9. To ensure the correct applications suite is referenced, select Dynamics 365 in the Extensions menu.
  10. Select Model management > Update model parameters.
  11. Select Fleet Management as the model in the first page.
  12. Ensure that the Application suite model is referenced.
  13. Select Next and finish the update.
  14. Select Dynamics 365 in the Extensions menu again.
  15. Select Options.
  16. Under the Dynamics 365 node on the left pane, select Projects.
  17. Ensure that the checkboxes for Organize projects by element type and Synchronize database on build for newly created project are selected.
  18. Select OK.

Create a table

  1. In the Solution Explorer window, right-click the project FleetManagementTableProject.
  2. Select Add > New Item.
  3. On the left pane, select Dynamics 365 Items and then select Data Model.
  4. On the middle pane, select Table.
  5. Enter FleetCustomersTable in the Name field.
  6. Select Add.
  7. The FleetCustomersTable will now be open in the Element Designer window.
  8. Right-click the FleetCustomersTable heading in the element designer and select Properties.
  9. In the Properties window, in the Label field, enter Fleet customers.

Add fields to the table

  1. In the Application object tree (AOT) in the Application Explorer window, expand the Data types node.
  2. Expand the Extended Data Types node.
  3. Select and drag the following EDTs onto the Fields node of the table FleetCustomersTable.
    • FirstName
    • LastName
    • Email
    • Phone
    • AddressStreet
    • AddressCity
    • AddressStateId
    • AddressZipCodeId
  4. Select Save in the ribbon.
  5. Right-click the project in the Solution Explorer and click Synchronize FleetManagementTableProject(ISV) [Fleet Management]with Database.
  6. Perform a build by right-clicking the project FleetManagementTableProject in the Solution Explorer window and selecting Build.

Create field groups and add fields to the field groups

  1. In the Table designer, right-click the Field groups node of the FleetCustomersTable heading.
  2. Select New group.
  3. Right-click the new field group and rename it PersonalInfo.
  4. Expand the Fields node of the FleetCustomersTable.
  5. Select and drag the FirstName, LastName, Email, and Phone fields from the Fields node to the PersonalInfo Field group.
  6. In the table designer, right-click the Field groups node of the FleetCustomersTable heading.
  7. Select New group.
  8. Right-click the new field group and rename it LocationInfo.
  9. Expand the Fields node of FleetCustomersTable.
  10. Select and drag the AddressStreet, AddressCity, AddressStateId, and AddressZipCodeId fields from the Fields node to the LocationInfo field group.
  11. Right-click the project in the Solution Explorer and click Synchronize FleetManagementTableProject(ISV) [Fleet Management] with Database.
  12. Perform a build by right-clicking the project FleetManagementTableProject in the Solution Explorer window and then selecting Build.

Close the lab environment

  1. Select Done in the Instructions pane in the lab side bar.
  2. In the Lab is complete window, select Continue, and then select Leave to return to the next unit in the module.