Lab - Create a base enumeration, add elements, and update properties

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.

Scenario

The finance and operations apps developer has been tasked with creating a new base enumeration for the Fleet Management company. The company needs to collect information about the vehicle type when a new vehicle is checked in for service. They would like a drop-down list to use in the user interface with the options for car, truck, SUV, and van.

Create a new project

  1. Minimize the Microsoft Edge window.
  2. Navigate to Visual Studio and right-click to 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 the FleetManagement model from the Model name dropdown list.
  12. Select Next, then select the ApplicationSuite in the Select referenced packages drop-down list.
  13. Select Next until the form closes.
  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 the check boxes are selected for Organize projects by element type and Synchronize database on build for newly created project.
  18. Select OK.

Create a base enumeration for vehicle type

  1. In the Solution Explorer window, right-click the project FleetManagementProject (ISV) [Fleet Management]. (In this lab, (ISV) and [Fleet Management] denote parameters of the project or object)
  2. Select Add > New Item.
  3. On the left pane, select Dynamics 365 Items and then select Data Types.
  4. On the middle pane, select Base enum.
  5. Enter VehicleType in the Name field.
  6. Select Add. The VehicleType base enumeration will now be open in the element designer window.
  7. Right-click the VehicleType (ISV) [Fleet Management] heading in the element designer and select Properties.
  8. In the Properties window, in the Label field, enter Vehicle type.

Add elements to the new base enumeration

  1. Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
  2. Select New Element.
  3. Select BaseEnumValue1 in the element designer.
  4. In the Properties window, enter Car in the Name field and in the Label field.
  5. Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
  6. Select New Element.
  7. Select BaseEnumValue1 in the element designer.
  8. In the Properties window, enter Truck in the Name field and in the Label field.
  9. Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
  10. Select New Element.
  11. Select BaseEnumValue1 in the element designer.
  12. In the Properties window, enter SUV in the Name field and in the Label field.
  13. Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
  14. Select New Element.
  15. Select BaseEnumValue1 in the element designer.
  16. In the Properties window, enter Van in the Name field and in the Label field.
  17. Perform a build by right-clicking the project FleetManagementProject (ISV) [Fleet Management] 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.