On a recent migration project, I was tasked with migrating some custom InfoPath forms from one farm to another. The kicker was that the source of these forms was a farm from another intranet that belonged to a different company that my client was acquiring. The form made use of several universal data connection files (UDCX) that referenced URLs on this other company’s intranet. To keep the form functioning, I had to update these files manually, and I thought I’d share the steps I took.

Required Tools

  • SharePoint Designer
  • InfoPath Designer 2010/2013 (Depending on your SharePoint Farm)
  • Visual Studio Code, NotePad, or your preferred Text Editor

Step 1 – Identify the UDCX Files used by the InfoPath Form

Note: If you already know which files you need to update and where to find them, feel free to skip this section

Open the site that uses the form using SharePoint Designer and locate the InfoPath form. If this is a custom list form, such as a display or edit form, it is under the ‘Forms’ section on the list information panel.

Open the form using InfoPath Designer, click the “Data” tab from the ribbon, and then choose “Data Connections.” From the panel that opens, you’ll likely see a list of connections. The connection’s we’re interested in will have a “Data connection file” property listed.

Make a note of all the files with that property and the value of that property as it tells you where to find the file.

Step 2 – Download & Update the Files

For each of the files, download a copy of the UDCX file to your local hard drive. Afterward, open them up using your preferred text/XML editor. I  use Visual Studio Code, but you can use whatever you prefer.

The next part is highly dependent on your specific files, but you’re going to want to search the XML for references to the URLs you’re migrating from and replace them with the correct URLs for your new environment. URLs are either fully qualified domains or relative, so be sure you’re looking for both.

Additionally, sometimes list GUIDs can be referenced, so if your list GUIDs have changed during the migration, you’ll need to update those as well.

Step 3 – Upload the New Files and Test

After making your modifications, upload your modified UDCX files to SharePoint, overwriting the migrated copies.

Once done go back to SharePoint designer and open the form again. Re-open the list of Data Connections and this time select one of the connections you updated. You can click next on the wizard, which should show you a list of properties that you can select from. If you’ve made it here, then congratulations, you’ve successfully updated your UDCX file!


Share and Enjoy !

Related Content: