Manual rebuild6 min readUpdated June 5, 2026

Script and managed-code event handlers

Understand why custom code is flagged and how to plan the Power Apps or Power Automate replacement.

Quick answer

In short

Custom InfoPath script and managed code are not automatically converted. Form Migrator flags them so the migration team can rebuild the behavior deliberately.

Most likely cause

The code may depend on object models, client-side events, external systems, or custom validation that does not have a direct Power Apps equivalent.

What to do next

Use the Analyze rule details to identify the event, then decide whether it belongs in Power Fx, Power Automate, a custom connector, or a manual process change.

Why it is not automatic

InfoPath code can access APIs, event lifecycles, and XML structures that Power Apps does not mirror. Converting it blindly would create a false sense of safety and can break business-critical validation or submission behavior.

Replacement options

  • Power Fx for control-level validation or value-setting.
  • Power Automate for notifications, approvals, integration, and post-submit work.
  • Custom connectors or Azure Functions for external service calls.
  • Business-process redesign when the old code solved a legacy-only problem.

What to send support

  • The XSN package.
  • The Analyze report showing the script/event handler.
  • A plain-language description of what the code did in production.
  • A test case that proves the expected behavior.

Keep reading the next most relevant guides for this form pattern.