How to combine Power Pages and Business Central

How to combine Power Pages and Business Central

When writing this blog post the feature is still in public preview.

For a long time there was already the possibility to get your data from Business Central into Dataverse through Virtual Tables. That was working with Power Apps but with Power Pages you get an error when you add a virtual table inside your website. But with the start of Business Central 23.1 it is possible!
It was possible with the sync method described here:
Business Central and the Power of Power Pages – Discover Microsoft Business Central (bertverbeek.nl)
But that wasn’t easy. With Virtual Tables option it is very easy to expose your data.

What are Virtual Tables?

Virtual tables inside Dataverse is a table that doesn’t hold any data. It is just a look through to Business Central:
Microsoft Power Platform integration with Business Central via virtual tables – Business Central | Microsoft Learn
And it works like this:

How to setup the virtual tables you can find here:
Business Central Virtual Table for Microsoft Dataverse admin reference – Business Central | Microsoft Learn

Setup inside Business Central

Before you start you have to enable the “Microsoft Entra Applications”. There are two applications for Power Pages:

One is for the anonymous access and one for the verified users. You have to enable the application and also assign permissions to it.

The anonymous access can only read data! Even if you have set right permissions. If you modify a record with anonymous access in Power Pages you get an “unknow error”. In the logs you can see that you don’t have access:

Inside Power Pages

Inside Power Pages you can easily create a list and attach that to the Virtual Table (in this case the vendor table):

And if you preview the website it looks like this:

And if you want to edit the records you have to go to the “Portal Management App”:

There you can set the “Query string”:

In this when you click on a record in the list you get the ID of that record in the URL.
After this you need to create a form:

And set if you want to update or create new records:

Also here in the “Portal Management App” you have set two settings:

At last you have to set the permissions for that table:

Even if you set here the “Anonymous Users” to “Update” and “Create” you still got the following error when you submit the form:

But when you Sign into the site with your Microsoft Entry ID or a verified users you can change the record and it will also change the record in Business Central:

After submit you will get:

And in Business Central:

So with this you can create websites based on Power Pages and expose your Business Central data. And even change your Business Central data.
Again a great possibly to extend your customers need!

The Microsoft documentation:
Power Pages on virtual tables – Business Central | Microsoft Learn

3 COMMENTS

SDP

Muchas gracias por el post, pero al seguir todos los pasos me encuentro con el siguiente problema:
Posterior a incluir las vista de vendor y asignar los permisos, cuando le doy a vista preliminar, me sale “Internal Server Error” en lugar de los registros de la tabla. Sabrias decirme porque salta ese error y como solucionarlo.
Muchas gracias de antemano ! 😉
GRAN POST!!

SDP

Thank you very much for the post, but after following all the steps I have the following problem:
After including the vendor view and assigning permissions, when I give it to preview, I get “Internal Server Error” instead of the table records. Could you tell me why this error occurs and how to fix it.
Thank you very much in advance .
GREAT POST!

    Bert Verbeek

    Sorry for my late reply (because of my holiday).
    But on what version are you running on?
    And have you enabled the app regidstrations in Business Central of the Power Pages?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.