I hope you and your family are healthy and safe during these unprecedented moments.
Today I was working on MS Dynamics 365 Business Central and would like to integrate my custom tables into power apps, I have checked many blogs but there is no clear documentation on it.
So I would like to write and share it with you.
Before going to start I would like to discuss some prerequisites and overviews.
- Power Apps is a suite of apps, services, connectors, and data platform that provides a rapid application development environment to build custom apps for your business needs.
- I would like to implement WMS features through power apps, Like, Scanning picks, Registering Picks, Printing labels, and so on.
- Creating a Custom Connector and accessing Business Central data from PowerApps.
- PowerApps provides a connector for most of the Business Central pages of type API.
- Microsoft Dynamics 365 Business Central
- Microsoft Visual Studio Code
- Microsoft Power Apps
Creating a Custom Connector and accessing Business Central data from PowerApps
PowerApps provides a connector for most of the Business Central pages of type API.
If you would like to access any other Business Central tables from PowerApps other than the list above, following are the steps to create a Customer Connector in PowerApps,
1> Create and publish the Pages with type as API in Business Central for the tables which have to be included in the custom connector
2> You can check with Postman or a similar app to make sure the Pages are accessible
3>Go to PowerApps -> Data -> Custom Connectors -> New Custom Connector -> Create from blank
Enter a Name for the Connector and click Continue
4> Enter the Description, Host, Base URL, and other details on the General tab.
5> Click on the Security tab and select the authentication type as Basic Authentication and enter the parameter label.
6> Click on Definition and then click on New action, enter the Operation ID and other details,
Click on “Import from a sample” to update the request URL and other details,
Select the operation type, GET and enter the URL of the Business Central Page, if required with the company filter and click on Import
Click the assist edit of the company and mark it as mandatory and select a default value as below,
Click on “Add default response” and copy and paste the response of the Get operation from the postman or similar app in the Body section. This is used to identify the data fields for the operation.
Check the Validation section, it must show Validation succeeded.
7> Click on New action and include other tables to be added in the connector if required in the same way.
8> Click on Create Connector when completed to create the custom connector.
9> Now we can use the connector created above in an App.
Click on Apps -> New app -> Canvas
10> Select Phone Layout (or Tablet Layout)
11> In the App, click on “Data sources” and search for the custom connector just created.
Select the connector, enter the username and password to add the connector to the app.
12>Now insert a “Reload” Icon by going to Insert -> Icons -> Reload
In the OnSelect property of the control enter the following code,
This will load the “Pick” data from “demo” company using the “warehouse” connector into the
Collection(table) name “PicksCollection” in PowerApps.
Add code for the refresh button
13> Now add a Gallery control to show the Pick data from the “PicksCollection” Insert a Gallery Control from Insert -> Gallery -> Vertical
Change the layout to Title, subtitle, and body
Enter the expression for the Items to show the records from the PicksCollection and click “Preview the App” icon or (F5) to see the PickList from Business Central
To implement the WMS feature in the NAV / Business Central please Contact VLC Solutions.
VLC Solutions has multiple Apps /Add-ons for NAV & Business Central to meet your business goals and make your business more productive.
For today that’s it, Thank you for reading.
Feel free to share your opinion on the below comment box.