Working with the Inventory Visibility Service for Dynamics 365 Supply Chain Management (part 2)
In my previous post in this series, I looked at how we could use Power Automate to call the Inventory Visibility service. In this part, I create a Power Apps app to show the result of the query.

To keep it simple, I have created an app that allows the user to select a warehouse at the top of the screen. The site is derived from the selected warehouse.
Once the warehouse has been selected, the user can select a product from the list and click on the arrow to see on-hand inventory. The following screenshot shows the result.

As you can see from the above, there is 293 pcs on hand for product 1000 in warehouse 11 at site 1.
So what did I need to do to query the Inventory Visibility service from the app?

On the OnSelect event on the arrow in the gallery, I have added the above code. In the code I set a variable called QueryResultJSON with the result of the on-hand query.
The Power Automate flow is invoked using the .Run() method with parameters from the warehouse drop-down control and the selected product in the gallery.
Lastly, once the Power Automate flow has returned the result, I navigate to the QueryResult screen where I use the QueryResultJSON variable to display the result (293 pcs).
Obviously, this is a very simple example, but it shows the power of being able to query and interact with inventory in Dynamics 365 Supply Chain Management in real-time.
This was originally posted here.
*This post is locked for comments