Note: If you don’t have any customization at business central then you can directly use the Data Source of Business Central, but if you have any customization in Business Central from scratch or extended fields then the Data Source of Business Central will not work for you. To access those custom fields and entities we need to create Custom Connector.
There are so many actions available in Custom Connector like Get, Delete, Post, Put, Head, Options and Patch. So, we are going to look at Get, Post, Patch and Delete.
Step 1: Click on Custom
Connector in PowerApps, now, click on New Custom Connector and after that
we need to Click on Create from Blank.
Step 2: Add the Name of your Custom Connector, You need to add multiple actions into the one Connector.
Step 3: Now Let’s Add Details in Custom Connector. We need to add Business Central Host in Custom Connector api.businesscentral.dynamics.com.
Step 4: Now move on the Security Tab and add User Name and Password after selecting the Authentication Type.
Now let’s move into the Definition tab
Get
Step 5: Let create Get action first to create get action we need to click on New Action Button as per below image. And need to add function name so it will be visible at PowerApp Side when we develop an app.
After adding the information we need to add the request information. In Request part need to click on the Import from sample.
Now, Click on the Get verb and When you add the URL at that
time don’t forgot to add variable for Company
Id without that the solution will
work as static. After adding all the information click on the Import Button.
Right now we are in the last step to complete the Get Action in which we need to add the default response from web service of business central.
Now you can test your custom connector from the last Test
tab. But let’s do that later before that let’s complete the other actions.
Post
Same as the Get action we need to add name of the function and action in the General part.
After adding the information at General Tab we need to add the details into Request tab as below image. We need to select Post action and after that we need to add the URL and sample body which we are going to use in our PowerApps.
Now we need to do same thing into the response part.
No comments:
Post a Comment