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

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 27

  • @brianmuturi911
    @brianmuturi911 Год назад +1

    hey, the error is in the second procedure, the action context is convertQuoteToOrder instead of convertQuoteToInvoice

  • @FunFiEmpire
    @FunFiEmpire 2 года назад

    Another great and fabulously useful video!

  • @kasperdanjensen9457
    @kasperdanjensen9457 2 года назад

    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 2 года назад

    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  2 года назад +1

      It is accessible from anything that knows how to talk OData, there's nothing "BC specific" here. www.odata.org/blog/actions-in-odata/

  • @MrNunoGSilva
    @MrNunoGSilva 2 года назад +1

    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  2 года назад +1

      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.

  • @monckfish
    @monckfish 2 года назад

    thank you for this, with this simple solution it'll allow us to build some really cool stuff! :)

  • @navnav3134
    @navnav3134 2 года назад

    Dear Eric,
    Is there any method to add to prompted category for actions?
    Best Regards,
    Nav

    • @Hougaard
      @Hougaard  2 года назад

      not sure what you're asking about?

    • @navnav3134
      @navnav3134 2 года назад

      @@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.

  • @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

  • @programmer_sujan
    @programmer_sujan Год назад

    Can we return text or any other data type in bound action?

    • @Hougaard
      @Hougaard  Год назад +1

      Must be created as fields in the bound table.

  • @mohdanas2846
    @mohdanas2846 2 года назад

    You need to change the function in setobjectid incase of invoice(ConvertquotetoInvoice). You just copy pasted above value.

    • @Hougaard
      @Hougaard  2 года назад

      No that's not it, and I reran the test after the vidoe finished and it worked ... guess it was fluke...

    • @FunFiEmpire
      @FunFiEmpire 2 года назад +1

      @@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.

  • @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