Power Pages: Convert Standard to Enhanced Data Model

Convert Standard to Enhanced Data Model
Facebook
Twitter
LinkedIn

Today we’re going to talk about migrating from the standard to the enhanced data model in Power Pages. If you’ve been working with PowerApps portals, Power Pages, or ADX Studio portals for a while, you know that all the metadata used to define your web pages, templates, and content snippets is stored as data within Dataverse tables. Traditionally, provisioning a Power Pages website meant installing numerous solutions and tables, which could clutter your Dataverse environment. However, Microsoft’s new enhanced data model changes this by integrating core Power Pages tables directly into Dataverse, making the whole process more efficient. In this blog post, we will explore the benefits of the enhanced data model and guide you through the migration process using the tools Microsoft has provided, now available in public preview.

Here’s a simple comparison between the standard data model and the enhanced data model in Power Pages:

Feature/Aspect Standard Data Model Enhanced Data Model
Data Storage Metadata stored in numerous Dataverse tables, often with adx_ prefix. Metadata integrated into core Dataverse tables.
Solution Management Clunky, with many additional solutions and tables loaded into Dataverse. More streamlined, with fewer solutions and tables needed.
Performance Can be slower due to the bloat of additional tables and solutions. Improved performance with efficient data storage and management.
Ease of Migration Challenging to move configurations between environments. Easier migration with support for JSON format and virtual tables.
Scalability Limited scalability due to clutter and complexity. Better scalability with a cleaner and more efficient setup.
Configuration Types Primarily configuration data, with transactional data handled separately. Supports configuration, transactional data, or both together.
Update Management Requires manual updates and management of custom solutions. Automatically managed by Microsoft, ensuring up-to-date core tables.
Setup Process Involves installing multiple solutions during provisioning. Simplified setup with core tables pre-installed in Dataverse.
Pipeline Deployments Limited support for pipeline deployments. Supports pipeline deployments, enabling smoother CI/CD processes.

 

To migrate from standard to enhanced version, go to the power platform admin center and go to the power pages sites.

Power Platform admin center environment page with Power Pages sites under Resources

 

In power pages sites, turn on this feature.

Convert Standard to Enhanced Data Model2

 

So, I have turned this on.

Power Pages sites view with the enhanced data model toggle switched on

 

As we can see there is a notification “Enhanced data model is enabled. All the new sites created in this environment will use this data model.” So, all the new sites created in this environment will be with the enhanced data model. But we are going to migrate the existing site to the enhanced data model.

If we want to check if our site is already with enhanced data model or standard data model. Then we can check the details of the site.

Power Pages active sites list with the site context menu open on Details

 

As we can see the current site is with standard data model.

Power Pages site details showing A Quality CRM Demo on the Standard data model

 

Now to migrate the website to the enhanced data model. We need the organization URL. To get the organization URL or instance URL we need to click the settings icon and then session details.

Power Pages settings flyout with Session details highlighted

 

Power Apps session details dialog with the instance URL highlighted

 

Before we dive into using the PAC CLI commands, let’s set up our environment to ensure a smooth workflow. Personally, I prefer using the PAC CLI within Visual Studio Code for the desktop. While you can use PAC CLI with PowerShell, Visual Studio Code offers a robust environment with a multitude of other features that can enhance your Power Platform development experience. If you don’t have Visual Studio Code installed yet, I highly recommend downloading it. Microsoft Learn provides detailed instructions for the installation process. Once you have Visual Studio Code installed, you’ll need to add the Power Platform tools extension. This extension includes the PAC CLI along with a host of other useful tools, ensuring your development environment is up-to-date and fully equipped.

Visual Studio Code with the Power Platform Tools extension page open

 

After installing and updating these tools, we can move on to running the PAC CLI commands. Open a new terminal in Visual Studio Code and get ready to connect to your Dataverse environment.

Visual Studio Code Terminal menu with New Terminal highlighted

 

pac auth create –environment https://source environment URL/

Terminal running pac auth create against the target environment URL

 

It will ask you to login to the environment.

Microsoft Pick an account sign-in dialog during Power Platform CLI authentication

 

As we can see, the account is successfully authenticated.

Terminal output confirming the Power Platform CLI authenticated successfully

 

Now, we will get the list of the power pages.
pac powerpages list

We have got the list. We have two sites in our organization.

Terminal output from pac powerpages list showing the available Power Pages websites

 

Now, we will migrate the site using this command.
pac powerpages migrate-datamodel –webSiteId 95956e47-2318-ef11-9f89-000d3ad843c6 –mode all

Depending on your needs, you can migrate in three different modes: configuration data, transaction data, or all. Configuration data includes your standard portal metadata, while transaction data includes items such as multi-form step sessions, invites, ads, and polls. If you want to capture everything, you can choose to do it all in one shot.

Terminal output showing the site configuration data migration completed

 

Now by using this command we can check the migration status.

pac powerpages migrate-datamodel –webSiteId 95956e47-2318-ef11-9f89-000d3ad843c6 –checkMigrationStatus

Terminal output showing the migration status reported as Completed

 

Let’s move on to the next step: updating the data model version in our portal. To do this, we’ll use the PAC CLI command.

pac powerpages migrate-datamodel –webSiteId 95956e47-2318-ef11-9f89-000d3ad843c6 –updateDatamodelversion –portalID 6750fb03-8ac7-447c-9228-00c2aeea276e

First, we need to obtain the portal ID. To find the portal ID, navigate to your Power Pages site and visit the following URL: https://yoursite.powerappsportals.com/_services/about.

This URL will display the necessary portal ID. Once you have the portal ID, you’ll be ready to run the PAC CLI command to update the data model version.

Terminal output confirming the site was updated to the enhanced data model

 

Now, lets go to the portal and check the details of the portal site. I refresh the page, and now I can clearly see the data model is updated to enhanced version.

Power Pages site details showing the site now running on the Enhanced data model

 

Writing all commands at one place:
pac auth create --environment https://source environment URL/

pac powerpages list

pac powerpages migrate-datamodel --webSiteId 00000000-0000-0000-0000-000000000000 --mode all

pac powerpages migrate-datamodel --webSiteId 00000000-0000-0000-0000-000000000000 --checkMigrationStatus

pac powerpages migrate-datamodel --webSiteId 00000000-0000-0000-0000-000000000000 --updateDatamodelversion --portalID 00000000-0000-0000-0000-000000000000

 

In conclusion, migrating from the standard to the enhanced data model in Power Pages offers significant benefits, including improved efficiency, streamlined data management, and enhanced performance. By following the steps outlined in this guide—from setting up your environment with Visual Studio Code and PAC CLI, exporting and converting your data, to updating the data model version—you can ensure a smooth transition. Embracing the enhanced data model not only optimizes your current setup but also prepares your Power Pages for future scalability and functionality enhancements. If the site is still on Bootstrap 3, pair this with the Bootstrap 3 to version 5 migration, and once the new model is in place, see how to capture portal form submissions as Dataverse leads. Don’t hesitate to start this migration process to leverage the full potential of Power Pages and Dataverse.