Sharepoint - Infopath change Publish Location
I had the same problem and found out a way to solve it. I saved the form as source files, opened all the files in a text editor (in my case on Visual Studio) and replaced all URLs, used for publishing (actually in 2 files: manifest.xsf and view1.xsl).
After publishing it worked fine.
Good luck.
Regards, Pilan
I found the best approach. It may be little manual but worth it (at least try it once).
- xsn files are basically a cab files with bunch of related files in it.
- rename xsn to cab and extract to a location (alternatively you could from infopath file > publish > export source files)
- Fix the manifest file for new target location
- Re-create the cab file (makecab command)
- rename cab to xsn
Here is a good article. http://sharepointkb.wordpress.com/2009/01/24/modifying-xsn-files-infopath/
Yes this is "by design". If you want to deploy a form to a different location, use Data Connection Files (.udcx). Here's a good article about how to create and use them properly. http://msdn.microsoft.com/en-us/library/ms772101.aspx
Now if you change the environments, you download the .udcx file from the DEV data connection library and change the ListId to the ListId of your PROD list, and upload the udcx to the data connection library of your PROD environment.
<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
<udc:WsdlUrl/>
<udc:SelectCommand>
<udc:ListId>{Change Here}</udc:ListId>
<udc:WebUrl>http://additportal/apps/addOffer/</udc:WebUrl>
<udc:ConnectionString/>
....
</udc:ConnectionInfo>
Then, if you re-publish, infopath will ask you if you want to adjust the the URLs