Summary

Completed

In this module, you registered and managed IoT devices using the Dynamics 365 Connected Field Service solution. There are several items that can be leveraged while registering and managing IoT devices.

We explored several of the key items including:

  • Examining device registration and the role that device twins play when interacting with IoT devices.

  • How device categories can be leveraged for grouping similar devices.

  • Exploring what command definitions are and how to build them.

  • Demonstrating the relationship between property and command definitions.

The next steps from here would be gain a deeper understanding of how to identify and handle exceptions. This would include items like telemetry, and different options for working with anomalies.

Note

In case you are moving forward with the exercise, do not delete the Azure resources as they would be needed in the next exercises. If they are deleted now, you may need to redeploy them.

Cleaning up your environment

If you are done, and ready to clean up your environment we will need to remove all the items that we created in this exercise. During this exercise, were created an IoTAlertProcesses solution to store all the customizations, workflows, and business process flows that we created as part of this exercise. This was done to not only make it easier to keep our changes together, but to also assist in the removal of these items upon completion of this module.

When you remove an unmanaged solution from Dynamics 365, it will only remove the container that groups the customizations together. Each customization would need to be manually removed from the system in a specific order rather than having to manually removing each process, relationship, and customization in a specific order, it is much easier to remove all the items at once. This can be done by using a managed solution. When you remove a managed solution, it removes all the items included in the solution. This is the process that we will be following in this exercise.

To fully remove all the items in the system, we must do the following: (High Level)

  1. Export the IoTAlertProcess solution as an unmanaged solution. (This will serve as a backup if you ever want it in the future, or if we have problems)

  2. Export the IoTAlertProcess solution as a managed solution. (This will be installed back into your environment)

  3. Delete the IoTAlertProcess unmanaged solution from your environment. (This will remove the container to make importing the managed solution easier)

  4. Import the IoTAlertProcess managed solution into your environment. (This will convert all the customizations to managed components)

  5. Delete the IoTAlertProcess managed solution from your environment. (This will act as an uninstall and fully remove all the changes we made from your environment)

Detailed Steps:

  1. Navigate to Power Apps and make sure you are in the correct environment.

  2. Select Solutions.

  3. Select the IoTAlertProcess solution.

  4. Click the Export button and follow the steps to export it as an unmanaged solution. Save the solution somewhere where it will be easy to find.

    • Make sure all your customizations are published. You can publish all the changes by selecting Publish button on the right-side menu.

    • Ignore any dependency or missing components messages since we will just be importing it back into the same environment.

    • Set Version Number as 1.0.0.0 and select UnManaged radio button in the Export as.

    • The file will export with the name as IoTAlertProcesses_1_0_0_0.zip.

  5. After the export process is complete, click the Export button again and follow the same steps, Set Version Number as 1.0.0.0 and select UnManaged radio button in the "Export as" to export the solution as a Managed solution.

  6. After the export process is complete, click the Export button again and follow the steps to export the solution as a Managed solution.

    • The file will export with the name as IoTAlertProcesses_1_0_0_0_Managed.zip
  7. With the IoTAlertProcesses (unmanaged) solution still selected, click the Delete button to remove the unmanaged solution from your environment.

    • Remember: This will only remove the solution container; all customizations will remain.
  8. Click the Import button and follow the prompts to import the IoTAlertProcesses_1_0_0_0_managed.zip file into your environment.

    • Ignore any warning messages that appear.
  9. Ensure the IoTAlertProcesses (managed) solution is selected, click the Delete button.

All the fields, form changes, workflows, and other customizations that we made are now fully removed from your environment.

Optional: Remove Azure Resource Group

Important

You should only follow the steps below if you are completely done with your Connected Field Service environment and do not plan on taking any other modules or doing anything else with it.

When you deployed the Connected Field Service add-on, it created an Azure Resource Group in your subscription that contains all the components of the template. If you are going to complete other learning in the near future, you might want to wait to do the cleanup until you have completed any of the other modules that require a Connected Field Service deployment.

If you are done, and ready to clean up all you need to do is simply delete the resource group in Azure. You can accomplish that in two ways, either via the Azure portal or from the Azure Cloud Shell.

Via the Azure portal

  1. Navigate to the Azure portal.
  2. On the left side, choose Resource Groups.
  3. Type your resource group in the filter by name or find it on the list.
  4. Select the Resource Group to open the detail page.
  5. After confirming it is the right Resource Group, select the Delete Resource Group option to delete the resource group. It will ask you to confirm the Resource Group Name, enter the name and click Delete.

Via the Azure Shell

  1. Navigate to Azure Shell.
  2. List your accounts using command az account list.
  3. Select your account using command: az account set -s "My Account Name".
  4. Delete the resource group using command: az group delete -n "Your Resource Group Name".