Exchange Rate Loader PowerApp for D365 F&O - Part 4

 In this final part I am going to go through one of the tweaks I made to the error messaging, what I experienced on running loads was the follow error due to timeouts on the Respond to PowerApps step in my flow:

ActionResponseTimedOut. The execution of template action 'Respond_to_a_PowerApp_or_flow' is failed: the client application timed out waiting for a response from service. This means that workflow took longer to respond than the alloted timeout value. The connection maintained between the client application and service will be closed and client application will get an HTTP status code 504 Gateway Timeout.

This meant that basically on long running flows the flow succeeded but the messaging back timed out and the user was unaware if it succeeded or not (limit I believe is 2 minutes).

The way I resolved to fix this was rather than rely on the Respond to PowerApps step to provide my status, every time I got a response back on the do-until I would write to a Dataverse table and display that instead on the form. This is how I achieved this:

I created a new DataVerse table with the following fields, Status and Error:


This I made a data source under my PowerApp and added it to the form:


To get the data in the table to refresh I placed a timer control to run automatically and on the end function I placed a refresh on the data source to modify how often the data on the form will refresh.


Finally I made some adjustments to the flow to update the new table:

Firstly to add the new row to the table and I used the same naming as the folder I used in blob storage account:



I then replaced the step at the end of the do until to update the table with the dataverse step, this works quite well as the statuses from Data Management are displayed to the user so I removed the spinner:


I tried it with files up up until 100k lines and it preforms ok. But as I am using data management to load this could be much quicker depending on own environment. This app could work for any data entity so I am planning in future posts to look at how to use it with General Journals which have a more complicated structure and maybe others...

A video of the App is below, 











Comments

Popular posts from this blog

"Exception while trying to get Virtual Entity metadata for entity" Error on Data Events

Electronic Reporting displaying Legal Entity Email/Phone by custom Address Purpose

Custom Connector for HMRC VAT Number Validation