Using centrally managed SharePoint data connection files with InfoPath 2007

03 November 2008

When deploying InfoPath forms with data connections between environments it is possible to use centrally managed data connection files to make the process a bit smoother.

To set up a centrally managed data connection do the following:

  • From your InfoPath form select Data Connections... from the Data menu
  • Select the data connection you want to make centrally managed and click the Convert button
  • A .udcx file will be created in a site collection data connections library you select so it may be necessary to set up a data connections library first
  • Navigate to the site collection data connections library and save the .udcx file locally
  • Go to SharePoint Central Administration - Application Management - Manage Data Connection Files
  • Upload the .udcx file to the central data connection files library
  • Go back to the InfoPath form and remove the existing data connections.
  • Recreate the data connections using Search for connections on a Microsoft Office SharePoint Server
  • Create the connection using the .udcx file that was saved to the site collection data connection library but make sure that you click on Connection Options... and select Centrally Managed
  • Configure the controls on the form to use the data connection as normal

The form will now use the centrally managed data connection. To deploy to another environment (eg. UAT, Production) you will need to upload the .udcx file to the relevant SharePoint Central Administraion after altering it to use the connection properties relevant to the new environment. To update the .udcx file open it in a text editor and alter the following parameters (example is for a connection to a SharePoint list):

   <udc:ListId>{175EC1CF-BF41-4848-B775-40277642B99F}</udc:ListId>
   <udc:WebUrl>https://productionurl.co.uk/</udc:WebUrl>

Where ListId is the SharePoint list id and WebUrl is the url of the site collection that holds the SharePoint list.

When you deploy your InfoPath form it will reference the centrally managed .udcx file allowing it to seamlessly connect with data in the new environment.