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: http://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 :http://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: http://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.

xsn refering to old url

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 is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

3 thoughts on “Migrating InfoPath Forms to SharePoint 2010

  • June 2, 2014 at 9:48 PM

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

    Reply
  • April 23, 2013 at 4:28 PM

    Good one! Keep it up!

    Reply
  • February 18, 2013 at 10:07 PM

    This is extremely useful info. Thank you

    Reply

Leave a Reply