Friday, March 2, 2012

InfoPath forms in SharePoint 2010: Relink documents to this library option

One of my last projects included a migration from a SharePoint 2010 on-premises to SharePoint Online. During the migration, I tested out some of the third-party migration solutions like Quest Migrator for SharePoint and MetaVis. In this migration I had a site collection which had a form library in which an InfoPath form was published. This library included hundreds of filled in InfoPath forms. The InfoPath itself had all sorts of logic with complex rules and actions in it. In the original on-premises the template opened fine within the Internet Explorer browser. But after the migration, the InfoPath forms didn’t open in the browser anymore. Instead, after clicking on a form, I received the following messages:

image

After pressing the OPEN option, I received the following screen:

image

After pressing the OK button, I received the following screen:

image

I was asked to enter my credentials from the old migrated SharePoint on-premises site! Huh? So it appeared that somewhere in this form template, it was still connected to the old SharePoint form library! So apparently, the migration didn’t go that well.

After doing some checking within InfoPath Designer in the ‘Design Checker’ option and going through all the field control properties, even tried replushing the template to this form library on the SharePoint Online site, I didn’t see anything strange. Then I looked in the SharePoint Online Site Collection if I would see anything strange. I could publish newly created InfoPath forms to this form library so my InfoPath was setup correctly.

Then I saw it. Within the form library settings, there is this link called ‘Relink documents to this library’.

image 

When clicking on this link, I noticed that all the url’s in the column ‘Template Link’ were still directing to my old SharePoint on-premises site.

image

After selecting the Relink option in the first InfoPath form, the ribbon showed me the following options:

image

When I pressed the Relink option, the template was set to the correct SharePoint Online forms library. But when I clicked the ‘relinked’ InfoPath form, I still would get the message:

image

What was I doing wrong?

I then tried publishing the InfoPath form as a content type (remember to enable the option ‘Enable the form to be filled out by using a browser):

image

I then added this new content type called ‘Aanvraag Server’ to my forms library. I then had 2 content types attached to this forms library, the default ‘form’ and my newly published server content type:

image

I then went to my InfoPath form, edit the properties and set the content type from ‘Form’ to ‘Aanvraag Server’:

image

After saving the document, I returned to the library settings to the ‘Relink documents to this library’. When I pressed the Relink option on this InfoPath form, the template was set to the correct SharePoint Online forms library with the content type ‘Aanvraag server’. And when I clicked on this ‘relinked’ InfoPath form, it opened within the Browser….

image

So it looks like in my scenario the InfoPath forms were not migrated correctly to my SharePoint Online site collection. Republishing the form as the default ‘forms’ content type also didn’t work as expected. But republishing the form as a server content type and adding this newly created content type to my forms library en ‘relinking’ my InfoPath form to this template did open the form within my browser.