How does Microsoft encourage thousands of developers out there to start writing mobile apps? Essentially they don’t. Instread they give you the right tool to make mobile development as easy as possible, so even those less tech-savvy out there can have a go and create something exciting.
Build business apps, fast – this probably is the only sentence this paragraph needs. It’s simple as that. Go to https://web.powerapps.com/ login, and create your first PowerApp, which with a click of a button you can deploy to Android device, or iOS device (well, sorry Windows Phone – we don’t miss you anyway). Microsoft gives us sample apps that are great demonstration of the capabilities:
That all is great, and PowerApps has been around for a few years now, but what does this have to do with Dynamics 365?
At Seaton Partners we are part of Microsoft’s Continuous Auto-Update Advantage Program (CAAP) and were granted early access to Platform Update 14, which introduces PowerApps integration.
A plan of action first: We want following to happen:
Firstly, the PowerApp should be opened from Dynamics 365. Upon opening, the PowerApp should check the incoming currency and then recover the exchange rate for this currency.
I decided not to reinvent the wheel and follow a few examples found on the internet on how to exactly create this kind of app. The basis for this solution is based on following excellent blog: https://baizini-it.com/blog/index.php/2017/12/18/powerapps-cryptocurrency-exchange-rate-api-custom-connector/
After following this through until creating custom connector, I created a blank PowerApp with tablet layout:
Next step is to add your flashy new custom connector to PowerApp:
This will create a datasource that we can then use to feed some data.
Passing a parameter to PowerApp is handled via ‘EntityID’ variable, and straight from Microsoft guidelines all you have to do is add following line of code into your ‘OnStart’ event of PowerApp:
If(!IsBlank(Param(“EntityId”)), Set(FinOpsInput, Param(“EntityId”)), Set(FinOpsInput, “”))
This will create a Global variable named FinOpsInput that we can use in entire application. The idea is that it will be the Currency Code of currently selected Vendor.
Next, I have added a new Label to my PowerApp that will show a text informing the user of the exchange rate. The text will be dynamic and will call the newly added connector. Here is how it looks like:
“The exchange rate between GBP and ” & FinOpsInput & ” is: ” & Value(Cryptonator.Run(“GBP-” & FinOpsInput).ticker.price)
I did hardcode GBP on purpose in above call just to make it simpler. And you are free to ignore the warning you might get in this screen.
Save it with a meaningful name. You can also set your own icon and colour:
You will need to grab one value; the AppId. Click on ‘Share’ button:
In the new webpage go to ‘Details’ tab, and the AppID will be there at the bottom:
Select this value and copy it to your clipboard; you will need it in a moment.
Dynamics 365 for Finance and Operations with PowerApp!
Navigate to screen of your choice: I went for Vendors from Purchase Ledger.
There are two ways of adding a PowerApp to Dynamics
1. Fast tab method
Open the ‘Form personalisation’ in any way you like. You will notice new ‘Insert’ button:
Next you will have to click on the area where you want to add the new PowerApp – click anywhere on the FastTabs and it will bring up the ‘Insert a PowerApp’ dialog:
You will have to populate few parameters – including the PowerApp Id. Notice the ‘Input data’ parameter; this lists the controls on the form. I went for Currency.
Close the personalisation window and reload the webpage. Bring up vendor details and enjoy:
The PowerApp properly grabbed the Currency code from selected supplier then it passed it onto our new connector to grab the exchange rate between GBP and this currency.
How awesome is that?
2. Ribbon Method
You will notice new icon on the ribbon:
Again, populate the data on Insert a PowerApp dialog and hit Insert button
In order to see your new App you have to refresh the page. Once this happens select a Vendor Record, click on the PowerApps icon on the ribbon again and enjoy your awesome integration:
Wait for it to load:
Microsoft did a great job giving power to the people – not only developers. Anyone with a bit of guidance can create an app like this. There are few limitations, but remember that this is constantly evolving ecosystem. Imagine that you would pass Vendor Account number, then use a data entity in your app to grab the rest of the fields. You could then display a map with address or trigger Flows to input data into CRM or Facebook. Options with this one are truly limitless and I am very interested how this will work in the long run.