Exposing business logic via APIs to the Power Platform with AL and Business Central

  Рет қаралды 4,195

Erik Hougaard

Erik Hougaard

Күн бұрын

Пікірлер: 27
@MrNunoGSilva
@MrNunoGSilva Жыл бұрын
For me, the big problem with this type of integration is the lack of feedback we can give to those who call the API. Status codes with different values and descriptions. In projects I participated in where there was an integration with PowerPlatform, the errors that NAV/BC passes to Powerplatform are very difficult to interpret, because they are text, that's the reason to try to set Status Codes.
@Hougaard
@Hougaard Жыл бұрын
IN that case, you'll want to create a table per API, think of that table as the parameters and return values. Then you can write back to that table and do what you want.
@brianmuturi911
@brianmuturi911 Жыл бұрын
hey, the error is in the second procedure, the action context is convertQuoteToOrder instead of convertQuoteToInvoice
@FunFiEmpire
@FunFiEmpire Жыл бұрын
Another great and fabulously useful video!
@monckfish
@monckfish Жыл бұрын
thank you for this, with this simple solution it'll allow us to build some really cool stuff! :)
@kasperdanjensen9457
@kasperdanjensen9457 Жыл бұрын
Cool and easy to understand example :-) Is it possible to get at follow up on how to iterate through the companies in BC and run a custom action (like in the video) per company?
@EdmundFelix
@EdmundFelix Жыл бұрын
Briiliant video as always @Hougaard . Thanls a lot. I have the following problem foryou and everybody, what ever i do when creating two functions in an API ie creating two procedures in a page API or/and creating a codeunit publishing it as API, and do the trick with the data URL, i always can see the first created and published function. For the second one i am getting the known error resource not found etc Does powerautomate and postman need sometime to refresh the metadata of the new web service? Does it need to do something else? Kind regards
@Hougaard
@Hougaard Жыл бұрын
Do you have the right attributes on the second method?
@eduschimu
@eduschimu Жыл бұрын
Good video. Would such an API action [ServieEnabled] also be accessible for a thirdparty WebShop? I would be interested in a video, where you explain this from the thirdparty side. Like you did in this video with Power Automate, but not with a MS Power Tool. Maybe this goes to far and the possibilities are endless, but what is the common ground of a Business Central developer and a WebShop developer? Or in other word: What info do I have to give to the other guy, so he can use the action?
@Hougaard
@Hougaard Жыл бұрын
It is accessible from anything that knows how to talk OData, there's nothing "BC specific" here. www.odata.org/blog/actions-in-odata/
@programmer_sujan
@programmer_sujan Жыл бұрын
Can we return text or any other data type in bound action?
@Hougaard
@Hougaard Жыл бұрын
Must be created as fields in the bound table.
@andreatarroni1148
@andreatarroni1148 Жыл бұрын
I read test and I ask this here, but I know this is not the right place. However my question is how we have to manage a confirmhandler or a messagehandler in a test codeunit? The official documentation is not really clear...
@andreatarroni1148
@andreatarroni1148 Жыл бұрын
I answer to myself because I resolve the problem, I read the code in an example from microsoft (ALAppextension downloaded from github) and I understood
@mohdanas2846
@mohdanas2846 Жыл бұрын
You need to change the function in setobjectid incase of invoice(ConvertquotetoInvoice). You just copy pasted above value.
@Hougaard
@Hougaard Жыл бұрын
No that's not it, and I reran the test after the vidoe finished and it worked ... guess it was fluke...
@FunFiEmpire
@FunFiEmpire Жыл бұрын
@@Hougaard Probably did not give Power Automate enough time to refresh completely.... I have seen several times when something is not there or does not work and two minutes later, it does.
@navnav3134
@navnav3134 Жыл бұрын
Dear Eric, Is there any method to add to prompted category for actions? Best Regards, Nav
@Hougaard
@Hougaard Жыл бұрын
not sure what you're asking about?
@navnav3134
@navnav3134 Жыл бұрын
@@Hougaard on some pages you have prompted categories for actions. Is there any way to add prompted categories? Best Reagrds, NAV
@innsbruckchris3572
@innsbruckchris3572 Жыл бұрын
Hello Eric, do you know how the power automate connection to Business central would be best set up for a service users instead of a human user and what is the correct licensing for this? running automation flows under a normal user could be difficut in case the user accound gets blocked or something like that. Thank you foryour help, kind regards,
@Hougaard
@Hougaard Жыл бұрын
It's a full licensed user you'll need.
@innsbruckchris3572
@innsbruckchris3572 Жыл бұрын
@@Hougaard Hello Erik, thank you for your reply. for me the whole licensing topic it is very confusing. reading the licensing guide it sounds like the full and team member licenses are only allowed for individuals (not service account). then there is the device license and i also think i have read something about accessing BC with a Microsoft 365 Licenses and in your oauth video you mentioned that accessing bc api's with service to service (which i think this would also be with power automate) even no license is required.
@Hougaard
@Hougaard Жыл бұрын
@@innsbruckchris3572 It all boils down to this: If you have access to BC data, you should have a BC license, even though you technically might not use that license to access the data.
@peterschipper01
@peterschipper01 Жыл бұрын
Dear Erik, Thank you very much for this video. This will be very helpful. I made the page exactly as you did and I published a webservice for this page. When I goto the webservice I get the following error: You do not have the following permissions on Page ConvertQuoteToOrder: Execute. To view details about your permissions, see the Effective Permissions page. Do you have any idea how to fix this?
@Hougaard
@Hougaard Жыл бұрын
The user needs permission to the page
How to access telemetry data from AL code in Business Central
32:11
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 200 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 1 МЛН
Getting started with AL Go! for Github and Business Central
19:23
Erik Hougaard
Рет қаралды 4,7 М.
ELI5 How to Access Business Central Web Services/API with Oauth
29:59
How to do streams in AL with Business Central
16:20
Erik Hougaard
Рет қаралды 4,5 М.
Create an Extension for Dynamics 365 Business Central in 6 minutes
6:47
APC Dynamics, Inc.
Рет қаралды 9 М.
Many ways to validate a field in AL and Business Central
27:03
Erik Hougaard
Рет қаралды 6 М.
Excel Report Layouts, new in Busness Central 2022 Wave 1 (v20)
28:16
Become a Business Central API Superhero
16:20
Dennis Fredborg
Рет қаралды 3,4 М.