<p>How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment?</p>

[{'answer_id': 20823, 'author': 'Mike Powell', 'author_id': 205, 'author_profile': 'https://Stackoverflow.com/users/205', 'pm_score': 0, 'selected': False, 'text': "<p>By site-specific, do you mean that the data connections in your forms refer to the server the form is deployed to?  If that's the case perhaps you could tweak your connections to use localhost instead of the server name for the hostname part of the data connection URLs.</p>\n"}, {'answer_id': 22192, 'author': 'Tundey', 'author_id': 1453, 'author_profile': 'https://Stackoverflow.com/users/1453', 'pm_score': 0, 'selected': False, 'text': '<p>In my scenario, I am not using the built-in "save" button. I have a data connection that I use to "post" the data to another list.</p>\n\n<p>Yes, that\'s what I mean by site-specific. I don\'t think you can use localhost \'cos then when a user saves the form, it\'ll try to post to the user\'s computer (i.e. localhost). I have tried to use relative paths but that doesn\'t seem to work.</p>\n'}, {'answer_id': 22615, 'author': 'Jason Z', 'author_id': 2470, 'author_profile': 'https://Stackoverflow.com/users/2470', 'pm_score': 2, 'selected': False, 'text': '<p>If you go into the submit options, there is an option to perform custom action using rules.  If you have all of the data connections set up, you can configure rules to select which connection to submit to.</p>\n'}, {'answer_id': 33052, 'author': 'bryansh', 'author_id': 211367, 'author_profile': 'https://Stackoverflow.com/users/211367', 'pm_score': 3, 'selected': True, 'text': '<p>If I understand your scenario correctly:</p>\n\n<p>You have an InfoPath form, with data connections that submit your data.\nYou wish to deploy this form on multiple SharePoint Servers and have those data connections submit data to the currently deployed server.</p>\n\n<p>You can\'t really get around needing to do work on every SharePoint server that you would want to deploy the form to.  However, you can get around needing to modify the InfoPath Form Template.</p>\n\n<p>If you use the SharePoint Data Connection Library (DCL), and create a UDC file from your data connection, on every SharePoint Server that you would want to use...then your InfoPath Template can just talk to the UDC file.</p>\n\n<p>Here\'s a link to an article about integrating InfoPath with SharePoint\'s DCL:</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/bb267335.aspx" rel="nofollow noreferrer" title="Integrating InfoPath 2007 with the Data Connection Library">http://msdn.microsoft.com/en-us/library/bb267335.aspx</a></p>\n'}, {'answer_id': 211946, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>This is a common problem, if you are working on a dev-system and need deployments to a productive system from time to time. I use a script that performs (plain text) replacements based on regular expressions. </p>\n\n<p><strong>on each deploy:</strong></p>\n\n<ol>\n<li>make a backup of your form ;-)</li>\n<li>Save your form as source code. <em>(I suggest you work on source code files rather than the .xsn, because the xsn is only a renamed .cab with the source files in it. And you are able to use source control in a more satisfying way.)</em></li>\n<li>open the <strong>manifest.xsf</strong> file</li>\n<li>search for the xml node "DataConnections"</li>\n<li>search and replace the site-url part</li>\n<li><em>(Do not forget the save-path, file-&amp;site attributes and publishUrl)</em></li>\n<li>deploy from the InfoPath Designer</li>\n</ol>\n\n<p>I use a script that does all the replacements. That works fine and already saved me a lot of work.</p>\n'}, {'answer_id': 595546, 'author': 'pnewhook', 'author_id': 71530, 'author_profile': 'https://Stackoverflow.com/users/71530', 'pm_score': 1, 'selected': False, 'text': '<p>re: speedfox\'s answer, try to stay away from editing the manifest whenever possible. It\'ll just lead to head aches.</p>\n\n<p>If I understand your problem, you\'re deploying to multiple servers (DEV, UAT, Production) and need to edit the data connection manually every time you go from one environment to another? Forgive me if I\'ve over simplified the problem</p>\n\n<p>I\'ve found the best way to make data connections site relative is to:</p>\n\n<ol>\n<li><p>Use data connection files in your form. Open the data connection wizard in infopath and for all of you data conencting click "Convert..." this changes your data connection from being embedded in the form to being an independant XML file. You\'ll need a Data Conenction Library on you sharepoint site to store these in. Create that in the browser.</p></li>\n<li><p>After you\'ve converted and the connection go back into it and there will be a Connection Options... button use it to change from "Local data connection library" to "Centrally managed connection library"</p></li>\n<li><p>Upload the data connection that is in your sites Data Connection Library to central admin</p></li>\n<li><p>When you publish your form make sure you\'re publishing to a centrally managed location (Central Admin)</p></li>\n<li><p>Use your form as a content type in any forms library on that site collection.</p></li>\n<li><p>To use the form on another site, upload the data connection file to the new servers central admin and publish the (unchanged) form to the centrally managed forms.</p></li>\n</ol>\n'}, {'answer_id': 1928555, 'author': 'Mehul Bhuva', 'author_id': 234599, 'author_profile': 'https://Stackoverflow.com/users/234599', 'pm_score': 1, 'selected': False, 'text': '<p>See my blog post where I take you step-by-step with relevant snapshots covering the following:</p>\n\n<p>a. Converting InfoPath Data Connections to DCL library in SharePoint.\nb. Publishing InfoPath form to a SharePoint List/Library \nc. Creating a .wsp solution package for the InfoPath form and its code-behind\nd. Creating a batch script that will deploy the InfoPath form on your Production site.\ne. Ensuring the InfoPath form has been deployed as a feature\nf.  Modify the DCL\'s in the production environment.\ng. Associate the InfoPath Content Type with the Document/Forms Library</p>\n\n<p>See the full blog post at: <a href="http://www.sharepointfix.com/2009/12/infopath-2007-form-and-nintex-workflows.html" rel="nofollow noreferrer">http://www.sharepointfix.com/2009/12/infopath-2007-form-and-nintex-workflows.html</a></p>\n'}]
['https://Stackoverflow.com/questions/20389', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1453/']