Lab - Extend an EDT

Access your environment

Before you start this lab, select Launch VM mode above.

To log in to your lab environment:

  1. Click anywhere on the Windows desktop in the lab window.
  2. On the Resources tab on the side bar, in the MININT box, select Password to have the machine's password typed automatically for you. Then, press Enter.
  3. The Internet browser will launch automatically after you log in (this can take a couple of minutes). Wait for it to navigate to the login page for Finance and Operations.
  4. On the Microsoft Sign-in page, insert your mouse cursor into the Username field.
  5. On the Resources tab, below the Azure Portal heading, select Username, then press Enter.
  6. In the Password page, below the Azure Portal heading, select Password, then press Enter.

To launch the lab instructions:

  • Select the Instructions tab on the side bar.

You can now begin your work on this lab.

Scenario

The Finance and Operations apps developer has been asked by the Fleet Management company to change a number-entry field on the Customer page. The Agency location code field only accepts 12 digits, and the company needs to be able to enter 14 digits. Because the company doesn't need a new field, the developer will create an extension of the AgencyLocationCode EDT in Visual Studio.

Create a new project

  1. Minimize the Internet Explorer window.
  2. Open Visual Studio 2015.
  3. Select Yes in the Do you want to allow this app to make changes to your device? window.
  4. To ensure the correct applications suite is referenced, go to the Dynamics 365 menu
  5. Select Model Management > Update model parameters
  6. Select the FleetManagement model from the Model name drop-down list.
  7. Select Next, then ensure ApplicationSuite is selected in the Referenced packages drop-down list.
  8. Select Next then Finish
  9. Open the File menu and select New > Project.
  10. In the New project dialog box, ensure that Dynamics 365 is selected on the left pane under Templates.
  11. On the middle pane, select Finance Operations.
  12. Name the project FleetManagementExtensionProject.
  13. Select OK.
  14. Open the Dynamics 365 menu in the ribbon.
  15. Select Options.
  16. Under the Dynamics 365 node on the left pane, select Projects.
  17. Ensure the check boxes for Organize projects by element type and Synchronize database on build for newly created project are selected.
  18. Select OK.

Extend the AgencyLocationCode EDT

  1. Select View in the ribbon which opens the application explorer. In the search bar, in the Application Explorer window, expand the AOT node and then expand the Data Types node.
  2. In the Data types node, expand the Extended Data Types node.
  3. Select the AgencyLocationCode EDT.
  4. Right-click the AgencyLocationCode EDT and select Create extension. An element named AgencyLocationCode.FleetManagement will be added to your FleetManagementExtensionProject in Solution Explorer. We recommend that you rename the extension to avoid conflict with any extensions that are rolled out during application updates. For example, you should rename AgencyLocationCode.Extension to AgencyLocationCode.abcExtension. For demo purposes, you will keep the default name.
  5. Double-click the AgencyLocationCode.FleetManagement element in the Solution Explorer window to open it in the element designer window.
  6. With the AgencyLocationCode.FleetManagement main node selected, go to the Properties window and change the String size property to 14.
  7. Perform a build by right-clicking the project FleetManagementExtensionProject in the Solution Explorer window and then selecting Build.

Close the lab environment

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