Interacting with Dynamics 365 through a HoloLens

HOW CAN I USE MY HOLOLENS WITH DYNAMICS 365?

I recently did a video and released it on a Friday night. No one saw it, but I still think it’s interesting, so I figured I’d document how it worked. Long story short, I wanted to try to create Microsoft Dynamics 365 for Field Service work orders with a Microsoft HoloLens. There’s no native app at this point, so I needed to put together a work around. I created a PowerApp, logged into the PowerApp via Edge on the HoloLens, and then updated Dynamics 365 with Flow. Here’s how.

THE POWERAPP

PowerApp built for D365 for Field Service and HoloLens As you can see in the above screenshot, the PowerApp is pretty straightforward. I just created a blank app, added some labels and branding, and then created a few controls. Of particular interest is the data sources for these controls. The data bound to the drop down is a Dynamics 365 connection. I have multiple connections to handle the accounts, the field service work order type, and the field service incident type. Ultimately, the data point selected by the user are going to act as inputs to a Flow, so I needed to have enough information to create the field service work order. The other interesting part is the code behind the Submit button. Dynamics 365 for Field Service PowerApp Flow Code to submit the information from the PowerApp to Flow. This logic takes the inputs from the user, based on their selections and entries into the PowerApp, and submits them to a Flow. After the submission happens, the user is sent to a thank you screen and the experience ends.

THE FLOW

When a user hits the submit button on the PowerApp, PowerApps submits the selected information to the Flow using a “PowerApps” trigger. These inputs are handled both in a “Create a new record” Common Data Service action and creating a file in SharePoint to record the images. Flow showing PowerApps driving interaction with Dynamics 365 for Field Service and SharePoint This solution uses Microsoft flow to perform the record updates based on the input from the PowerApp. Additionally, this flow handles the input from the HoloLens’s camera as a string, passes it through an Azure Function App (thanks to this wonderful blog post from John Liu) and converts it to bytes. One little HoloLens-specific trick here – the device’s camera saves the files as PNG, so the Azure Function has to say body = body.Replace(“data:image/png;base64,”, “”) instead of body = body.Replace(“data:image/jpeg;base64,”, “”).

SHAREPOINT

Finally, one of the benefits of using the HoloLens is the camera. I created a SharePoint document folder to hold the images that are sent with the Flow. By making sure the filename matches the Field Service work order ID, it’s easy to see which photos relate to which order. SharePoint images from HoloLens

THE FINISHED PRODUCT

Here’s the finished video. I used the record feature on the HoloLens to record what I was seeing and then edited the videos to better show what was on my screens. For some reason, the monitors showed up mostly white, but the images should help visualize.

Recent Posts

Contact us

Tags