Sunday 17 November 2013

Update InfoPath forms after content DB restore to different URL in SharePoint 2010

You may face issue in accessing InfoPath form after restoring a content database in new webapplication or sitecollection.




Assuming you have restore content DB of http://SP2010server:2323 to http://SP2010server:1666

First Test Content Database:

Test-SPContentDatabase –Name WSS_Content_1666 -WebApplication http://SP2010server:1666

Export Infopath form: 

You can use the Stsadm -o ExportIPFSAdminObjects command to collect and export InfoPath administrator deployed forms only

Import Infopath:

Import-SPInfoPathAdministrationFiles -path "E:\folder1\IPF.dat"

Update url of Infopath admin approved form:

Get-SPWebApplication http://SP2010server:1666 | Update-SPInfoPathAdminFileUrl –find "http://SP2010server:2323" –replace "http://SP2010server:1666"


Update url of  user input infopath forms:

Get-SPWebApplication http://SP2010server:1666 | Update-SPInfoPathUserFileUrl –find "https://myworld.sp.in" –replace "http://SP2010server:1666"

Get-SPWebApplication http://SP2010server:1666| Update-SPInfoPathUserFileUrl –find "http://SP2010server:2323 " –replace "http://iga-sp2k10-app:1666"




Run the following commands to force deactivating and activating the Forms Services feature:


stsadm -o deactivatefeature -filename IPFSSiteFeatures\feature.xml -force -url %SITE_COLLECTION_URL%

stsadm -o deactivatefeature -filename IPFSWebFeatures\feature.xml -force -url %SITE_COLLECTION_URL%

STSADM.EXE -o activatefeature -filename IPFSSiteFeatures\feature.xml -url %Sitecollection_URL% -force

STSADM.EXE -o activatefeature -filename IPFSWebFeatures\feature.xml -url %sitecollection_URL% -force

** NOTE: The “%Sitecollection_URL%” is a place holder that would be replaced with your site collection URL, such as: http://sharepoint/sites/YourSiteCollection

No comments:

Post a Comment