DEV Community

Rob vanBrandenburg
Rob vanBrandenburg

Posted on

D365 F&O and PowerApps (2)


This is part 2 of using PowerApps with Microsoft Dynamics 365 Finance and Operations. Part 1 is here

This is going to be a short post, as there is not much to it.
As seen in part 1, you can link to a (canvas) PowerApp from the D365 F&O UI by using the 'PowerApp' button.
However, you can also 'embed' the (canvas) PowerApp in the UI, but this has to be done through actual F&O development.

First, this doesn't make a lot of sense. The whole idea of the NoCode/LowCode PowerApps is that you do NOT need a developer (and consequent downtime and deployment).
But since the option is there, I figured I'd try it out.

The official documentation is here:

Disclaimer: I know the example below makes no business sense. I'm showing sales order lines in the PowerApp that are already present in the F&O form that I add the App to. But since I already had the App from part 1, I figured I'd just reuse it to show the concept.

Adding the App to a screen (form)

The actual dev task is very simple. For this example we will be adding the App from part 1 in a new tab in the 'Sales Orders' inquiry form. ('Retail and Commerce -> Inquiries and Reports -> Sales Orders').

The form name is 'MCRSalesTableOrderHistory', so we first create an extension to that form in Visual Studio.
Then we simply add a tab page, and add a 'PowerAppsHost' control to the page.
In the properties we set the AppId and the field that we want to pass to the App as the key. (Review Part 1 for details)

The scaling of the App in the UI is pretty terrible. I manually set the height and width in the control's properties, but it still renders it with a very tiny font.
I have not tried to modify the actual App to use a larger font, but in my opinion this should not be necessary.
In any case, it does work, the order lines of the order I selected in the main grid are displayed in the PowerApp.

Here you see where I set the properties to try and make it bigger (did not work):


You can add embedded PowerApps directly to the F&O UI. It works. However, I have trouble finding a scenario where you would want to do this.
The only thing I can think of is when you have a PowerApp that serves up data/functionality of an external (non-F&O) system.
But still the rendering in the UI looks pretty bad.

Discussion (0)