View legacy documents for vendors in D365 Finance using Power Apps

Hello all,

During my time implementing D365 F&O, a common requirement I come across is “Can I migrate my legacy vendor invoices to the new system” – as far as I know this is not possible without an expensive customization or by involving MS. There is a data entity called VendorAttachments but it doesn’t work for file migration into the system.

My solution to this is simple but yet elegant. It assumes that you have your actual vendor invoices (or Customer also) in a cloud storage such as SharePoint or maybe One drive. For my example I will use SharePoint as the legacy repository of the files. (If you don’t have them in SharePoint there are ways to migrate files to SharePoint but that’s another topic)

Quick video of the solution:

End Result

The setup on my SharePoint list for this POC is very simple. Here is the structure below:

Simple list with a few columns to identify the metadata of the invoice, in my case just the Vendor Number (must match the vendor numbers in D365 F&O) and the invoice date. You could also add the Invoice Number as well. SharePoint lists have a default Attachments column by default that I am leveraging to store the actual file.

The actual Power App is connected to this Share Point list as the data source (this means since it is using SharePoint as the data source then no extra licensing is needed for end users to consume the App, good news šŸ˜€)

The secret is to use this piece of code on the “Onstart” property of the App

If(!IsBlank(Param(“EntityId”)),Set(varFinOps,Param(“EntityId”)),Blank())

This piece “Param(“EntityId”)” will store the vendor number passed from D365 Finance when the user wishes to view the legacy invoices.

The rest of the App is just a basic gallery with some label controls. The drop down controls at the top allow the user to filter by month and year to narrow down the results.

To insert the App into D365 F&O, just head over to the vendors form, and in the top under the PowerApps icon select to insert a new App.

then using your AppId, you can get it from the settings menu in PowerApps

Enter that info in D365F&O like below. The other trick is to select which field to pass to this variable above “Param(“EntityId”)”, this is done with the field in F&O called “Input context for the App”

This is it, once done the the user will be able to select a vendor, then click on the PowerApps icon, select the custom app and view and download the legacy invoices for that selected vendor only.

The download icon will allow you download the document.

Thanks for reading, until next time.

Juan Sebastian Grijalba, CPA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s