Migrating InfoPath Forms to SharePoint 2010

When migrating InfoPath forms to SharePoint 2010, The first show stopper is: Data connections. Data connections are hard coded in the InfoPath Farm.

Lets say: we are migrating from MOSS 2007 environment (Say: https://MOSS.Company.com) to SharePoint 2010 (Say: Http://SharePoint.company.com). Doesn’t matter whether you Upgrade/Migrate – After the migration all the existing InfoPath Forms will still be pointing to the old URL :https://MOSS.Company.com.. Ouch!

Do we need to go to each and every Form, Change the connection to fix this? OMG! Luckily, SharePoint offers a PowerShell cmd-let to fix this issue: Update-SPInfoPathUserFileUrl

Update-SPInfoPathAdminFileURL -find <OldUURLtoReplace> -replace <NewURL>

In Case, This doesn’t help or Form template is missing then you can upload/publish your new template and re-link them. (Under General Settings, click Relink forms to this form library)

Technet article addressing this issue: https://technet.microsoft.com/en-us/library/cc263286.aspx#FormTemplateLinks

For Admin Approved InfoPath forms, you can use:
stsadm -o exportipfsadminobjects command export the IP forms to a CAB file and then use Import-SPInfoPathAdministrationFiles cmdlet for importing them.

How about Existing Forms (XML Files) Created?
The Update-SPInfoPathUserFileUrl  will fix only the Template URL of the FORM Library, But not on the existing XMLs created on the Form Library. The HREF attribute in the existing Infopath XMLs must be changed.

To Fix the existing Forms, We need to Relink them. Just get into Form Library settings >> Relink All

You can get the List of Form Libraries using PowerShell:  Find All InfoPath Form Libraries

If you have many Form Libraries and want to update the existing Form’s connections, you can use PowerShell script: https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/update-spinfopathuserfileurl?view=sharepoint-ps

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

3 thoughts on “Migrating InfoPath Forms to SharePoint 2010

  • you are the Man! spent some time on the web ( and troubleshooting…) until I found this. Thx!

  • Good one! Keep it up!

  • This is extremely useful info. Thank you


Leave a Reply

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