In this blog post I will show you how easy it is to create powerapp that is connected to Dynamics 365 for Finance and operations.
This app will use input data from D365Fo and will pass it to a cognitive service.
The first step is to create the powerapp on powerapps.com.
We create a powerapp from blank.
On the screen1 we will set the onstart property the following formula:
With this formular the powerapp will set an variable called “FinOpsInput” with data provided from D365FO.
The next step is to visualize the input data from D365FO. For this we will insert a label field and set the text property to the variable “FinOpsInput” and rename the field to “d365input”.
These are the required steps to get the data from D365FO into the powerapp.
The next in my example is to add a cognitive service to a translation of the product name.
For this we have to add the datasource Microsoft Translator to the powerapp:
In the View Tab we will select “Data Sources”.
The next step is to add the datasource.
For this we have to set a new connection and then to select the connection called “Microsoft Translator”.
Here you see the connected service.
To use the cognitive service we will add another label field and set the text property to MicrosoftTranslator.Translate(D365Input.Text,DE).
- D365Input = labelfield from the step above
- The language to translate can be setup direct in the formular or with a dropdown or with another label field. In my example it is labelfield called “DE”.
In my example I add a second label field as a translate field. But is not important here at this point.
That is all we have to do to create the powerapp.
Please save and publish your app.
Now open Dynamics 365 for Finance and Operations (PU 14 or higher) and embed the PowerApp. This example only works for forms and not for workspaces.
Open the form All Products and Product Masters:
In the right corner you find the sign for PowerApps. Click on it and select “Insert a PowerApp”.
On the next screen we have to setup the connection. For this setup we need the unique powerapp id.
you will find this ID in the details of the app powerapps.com
- Name of the PowerApp will use in D365FO
- Unique App ID of the powerapp
- Input Data for the Powerapp( in my example we will use the product name)
- Application size
- Legal Entities where i can use the Powerapp.
After doing this setup we have to refresh the browser with F5 and then we can open the powerapp and we will get the translation of the product name.
How cool is this?