Lab - Create a base enumeration, add elements, and update properties
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 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
- Minimize the Microsoft Edge window.
- Navigate to Visual Studio and right-click to Run as administrator.
- Select Yes in the Do you want to allow this app to make changes to your device? window.
- Select Continue without code.
- Open the File menu and select New > Project.
- In the New Project dialog box, search for Finance Operations, and then select Next.
- In the Configure your new project dialog box, enter FleetManagementProject in the Project name field.
- Select Create.
- To ensure the correct applications suite is referenced, select Dynamics 365 in the Extensions menu.
- Select Model Management > Update model parameters.
- Select the FleetManagement model from the Model name dropdown list.
- Select Next, then select the ApplicationSuite in the Select referenced packages drop-down list.
- Select Next until the form closes.
- Select Dynamics 365 in the Extensions menu again.
- Select Options.
- Under the Dynamics 365 node on the left pane, select Projects.
- Ensure the check boxes are selected for Organize projects by element type and Synchronize database on build for newly created project.
- Select OK.
Create a base enumeration for vehicle type
- 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)
- Select Add > New Item.
- On the left pane, select Dynamics 365 Items and then select Data Types.
- On the middle pane, select Base enum.
- Enter VehicleType in the Name field.
- Select Add. The VehicleType base enumeration will now be open in the element designer window.
- Right-click the VehicleType (ISV) [Fleet Management] heading in the element designer and select Properties.
- In the Properties window, in the Label field, enter Vehicle type.
Add elements to the new base enumeration
- Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
- Select New Element.
- Select BaseEnumValue1 in the element designer.
- In the Properties window, enter Car in the Name field and in the Label field.
- Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
- Select New Element.
- Select BaseEnumValue1 in the element designer.
- In the Properties window, enter Truck in the Name field and in the Label field.
- Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
- Select New Element.
- Select BaseEnumValue1 in the element designer.
- In the Properties window, enter SUV in the Name field and in the Label field.
- Right-click the VehicleType (ISV) [Fleet Management] base enum in the element designer.
- Select New Element.
- Select BaseEnumValue1 in the element designer.
- In the Properties window, enter Van in the Name field and in the Label field.
- 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
- 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.