web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

Portal Migration Error

(0) ShareShare
ReportReport
Posted on by 24
Hello,

We are currently migrating our portal configuration from Dev to Prod using PAC CLI. The migration completes successfully; however, we’ve noticed that Custom JavaScript and detailed form descriptions are not updating to the latest versions in Production.
We retried the migration several times with no success. As a troubleshooting step, we deleted the affected pages in Production and reran the migration. Unfortunately, the pages are no longer being imported into Prod, even though they are present in the downloaded migration folder.

We are now encountering the following error:
XRM Network error: Entity adx_entityform Record Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Error: A validation error occurred. The value 0 of 'adx_entitysourcetype' on record of type 'adx_entityform' is outside the valid range. Accepted Values: 756150001,756150002,756150003
 
Both our Dev and Pre-Prod environments use the Enhanced Data Model (EDM), while Prod is still on the Standard Data Model (SDM). We suspect this model difference may be contributing to the issue. However, we’ve successfully imported the portal configuration from Dev (EDM) to Prod (SDM) in the past without errors.

Could you please advise on how to resolve this issue and ensure that the latest custom JavaScript and form details are properly migrated?


Thanks 

 
Categories:
I have the same question (0)
  • Verified answer
    Jerry-IN Profile Picture
    214 on at
    Portal Migration Error
    Hello  ,

    Thank you for providing the detailed description of your PAC CLI migration issue it's clear this is frustrating, especially since past migrations from EDM to SDM worked fine. Based on the symptoms (custom JavaScript and form descriptions not updating, pages failing to import after deletion, and the specific validation error on adx_entitysourcetype), the root cause appears tied to the data model differences between your Dev/Pre-Prod (Enhanced Data Model, EDM) and Prod (Standard Data Model, SDM).
     
    Recent updates to Power Pages have introduced stricter compatibility checks during imports, particularly for entity form metadata like option sets.

    To fix this and ensure full migration (including latest custom JS and form details), follow these steps. I'll focus on compatibility adjustments since direct EDM-to-SDM uploads aren't fully supported without tweaks, and Microsoft recommends aligning models long-term by upgrading Prod to EDM.
    • Download from Dev with Correct Model Specification:
      • Ensure you're using PAC CLI v1.31.6 or later (run pac --version to check; update via winget install Microsoft.PowerPlatform.CLI if needed).​
      • Authenticate to Dev: pac auth create --url https://your-dev-org.crm.dynamics.com
      • List sites: pac pages list
      • Download the portal config, specifying EDM (model version 2): pac pages download --path "C:\Temp\DevPortal" --websiteId [Your-Dev-WebsiteId] --modelVersion 2 --overwrite
      • This ensures the export captures EDM-specific data correctly. Verify the downloaded folder has your latest custom JS (in adx_webpage YAML files under Custom JavaScript fields) and form descriptions (in adx_entityform or adx_webform records).​
    • Adjust Data for SDM Compatibility Before Upload:
      • Open the downloaded folder and locate the affected adx_entityform YAML files (under the adx_entityform subfolder).
      • Edit each file: Set adx_entitysourcetype to a valid SDM value based on your form's intended source:
      • 756150001: Query String (for ID from URL query param)
      • 756150002: Current Portal User (for logged-in user's record)
      • 756150003: Record Associated to Current Portal User (for related records)
      • If the field is 0 or missing, assign the appropriate value (e.g., 756150001 for most forms). Save changes.
      • For custom JS not updating: In adx_webpage or adx_entityform YAMLs, ensure adx_customjavascript isn't empty—add a blank line or space if cleared, as null values can be skipped during delta uploads.​
      • Regenerate the manifest if needed: Re-run the download command to update manifest.yml (delete tracker), which handles recreations after Prod deletions.​
    • Upload to Prod with SDM Specification:
      • Authenticate to Prod: pac auth create --url https://your-prod-org.crm.dynamics.com (or pac auth select --index [Prod-Index] if multiple profiles).
      • Upload, specifying SDM (model version 1) and forcing full upload to override deletions: pac pages upload --path "C:\Temp\DevPortal" --modelVersion 1 --forceUploadAll
      • The --forceUploadAll ensures deleted pages are recreated, bypassing delta logic that might skip them.​
      • Monitor the log for errors; if validation persists, manually update one adx_entityform record via Portal Management app in Prod to test (set adx_entitysourcetype directly).
    • Post-Upload Fixes:
      • Clear Cache: Changes like custom JS often require cache invalidation. In Prod's Portal Management app, go to the website record > Advanced tab > Clear Cache (or use CLI: pac pages clear-cache --websiteId [Prod-WebsiteId] if available in your version). Also, sync configuration: Advanced > Sync Configuration.​
      • Verify Updates: Browse the portal, hard-refresh (Ctrl+F5), and check entity forms/pages. If JS still doesn't reflect, confirm it's included in the solution export or add to site components manually.​
      • Test in Pre-Prod first (also EDM) to isolate if the issue is purely SDM-related.
    If errors persist after these steps (e.g., share the full PAC log), it could indicate custom plugins/workflows on adx_entityform needing refactor. Feel free to provide more details for deeper troubleshooting.
     
    Best Regards,
    Jerald Felix
  • Fubar Profile Picture
    8,224 Super User 2025 Season 2 on at
    Portal Migration Error
    To be honest I would never try using different Models (particularly where Pre-prod is a different model to Prod). The models are structured differently with Enhanced using Virtual tables rather than the traditional normal tables that are the adx_ prefix (the virtual tables do not look at most of the adx ones, but rather to a large table that contains different record types) so someone passing something in Pre-prod is not looking at exactly the same thing structurally that will be prod.
     
    As per the earlier post, the only suggestion I would have is to ensure that you are setting the modelVersion parameter 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 50 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 38 Super User 2025 Season 2

#3
Jerry-IN Profile Picture

Jerry-IN 30

Last 30 days Overall leaderboard