In the previous post we improved our PowerApp by adding Microsoft Flow to it that extracts data from Finance and Operations based on the information entered to the Item number field.
In this post we will embed PowerApp to MSDyn365FO on the Released products page. In addition, we will pass item number value from the selected record on the Finance and Operations page to the app automatically when it opens.
Before we even open MSDyn365FO we should do one simple change to our PowerApp. For the “OnStart” action we should add following expression:
If(!IsBlank(Param("EntityId")), Set(FlowValues,'PowerApp->Getarecord,RespondtoPowerApps'.Run(Param("EntityId"))))
Where Param(“EntityId”) represents the value passed from MSDyn365FO as an Input for our PowerApp. You can find additional informaiton about Embedded PowerApps in this docs article.
Then we also should set default value for the Item number to Param(“EntityId”), this will automatically fill in Item number in the app and trigger our flow to extract rest of the data.
After we did all the changes we should save and publish the app.
Next step would be to open Finance and Operations and insert the PoweApp:
In the opened dialog enter PowerApp name that you want to display in MSDyn365FO, AppId (you can find it in PowerApps details), Input value that you want to pass to the app (Item number) and application size (Thin, since in the very beginning we choosed Phone layout for our app).
Unfortunately, we can pass only one field to PowerApp, however, now it is not a big deal for us since we can extract additional information with the help from MS Flow.
Click Insert and reload the page. Now you can open the app from MSDyn365FO.
Once again, our fnal result:
That is all. As you can see we can use PowerApps to cover various business requirements without a developer assistance, however, it requires some creativity to combine new tools into one complete solution.
*This post is locked for comments