Skip to main content

How to Migrate a InfoPath List Form to another List Form in SharePoint 2013

I encountered an issue recently where the Info Path form got published accidentally with improper layout.
As we all know that Info Path does not maintain versions and it is impossible to revert to the previous versions.  Luckily I had the back up of the SharePoint list template from where I could open the previous version of the Info path form.

Following are the steps I tried to migrate the Info Path form from the back up to the new SharePoint list.

1. Create a new SharePoint list from the list template.
2. Open the newly created list and click on "Customize form" to open the form in Info path designer.
3. Extract the source files by clicking on File->Publish-> Export Source Files.
4. Update the manifest file with the URL, List ID, Content Type ID of the list to which the Info path form has to be published.

Steps to update the manifest file:

1. Get the List ID from the URL by clicking on List settings. The List Id would be something like List=%7B691FF1A0%2DADB6%2D4032%2DA7CC%2D7E2217E666EB%7D. Now decode the List ID using any URL decoder site or manually to get the List Id in proper format. The decoded List ID would be something like {691FF1A0-ADB6-4032-A7CC-7E2217E666EB}

2. Ensure that the list allows management of Content types and get the content type ID by clicking on the Item Content Type in the list settings page. The content type ID would be something like ctype=0x0100C04093A5341E3C45864A34ED9ED61B66 
The Content Type ID need not be decoded. Take it as it is.
3. Open the manifest.xsf file in notepad and perform the following steps:

        3.1. Find <xsf:extensions>, and change the URL for runtimeCompatibilityURL.  It would be something like runtimeCompatibilityURL="../../../_vti_bin/FormsServices.asmx".  Change the ../ to the full URL of the subsite that holds the list like runtimeCompatibilityURL=”https://<new site>/<new subsite>/_vti_bin/FormsServices.asmx"
        3.2.Change <xsf2:list path="../../../"></xsf2:list> to <xsf2:list path="https://<new site>/<new subsite>/"></xsf2:list>
        3.3.Apply the same change for the line: <xsf3:solutionMode mode="list" originalPublishUrl="../../../" isListEditForm="yes"></xsf3:solutionMode>
        3.4.If it exists, update the URL of this line: <xsf3:baseUrl relativeUrlBase="https://<old site/<old subsite>/Lists/<list>/Item/"></xsf3:baseUrl>

         3.5.Each data connection will have a separate <xsf:dataObject> listing.  Update the siteURLsharePointListIDrelativeListURL parameters of the sharepointListAdapterRW area for each data connection. Please note that here, the relativeListURL is like Lists/<ListName>InfoPath list form manifest.xsf dataobject
         3.6.At the end of the file, there will be a section <xsf:query>.  Update the sharepointListAdapterRW parameters for siteURLsharePointListIDrelativeListURL as well as contentTypeID.InfoPath list form manifest.xsf SharePointListAdapterRW oldHere’s what it looks like after updating.InfoPath list form manifest.xsf SharePointListAdapterRW updated

4.Save and close the manifest.xsf
5. Right click on the manifest.xsf file and click on Design. The template gets opened in the Info path designer. Publish the form. The form gets published to the URL of the SharePoint list where we need to revert or migrate the infopath form from the backup template.

*Note: Above steps are applicable to SharePoint list form and not Form library. In form library, it is possible to directly change the publishing URL.


Happy SharePointing!!! 



Comments

Popular posts from this blog

This site has exceeded its maximum storage limit.Error while uploading file to document library - SharePoint

Issue:  Unable to upload files to SharePoint document library irrespective of the document size. Solution: When you delete items from a SharePoint site, they're sent to the site Recycle Bin. When you delete items from a site Recycle Bin, they're sent to the site collection Recycle Bin.  A SharePoint site collection administrator can view and restore deleted items from the site collection Recycle Bin to their original locations. If an item is deleted from the site collection Recycle Bin, or it exceeds the retention time, it is permanently deleted. 1. Click the gear icon and go to the "Site Settings" page. 2. Under the Site Collection Administration, click on "Recycle bin". 3. Delete the unwanted files.

"An unexpected error has occurred. Changes to your data cannot be saved" excel SharePoint

“If you’re not making some notable mistakes along the way, you’re certainly not taking enough  business and career chances .” After creating a custom "Export to Excel" button on the SharePoint page as in my previous post:   https://nethrasb.blogspot.com/2020/05/export-to-spreadsheet-option-in.html we encountered an issue, where one of the user received "An unexpected error has occurred. Changes to your data cannot be saved" in the excel sheet to which the data has been exported. But I was able to export the data using "System Account" without any issue!  The user has full control over the site and there should not be any permissions related issues.  What could be the issue then?  It might seem silly but this is what happened. Humans make mistakes :) My fellow team mate who had been asked to create the view, created a "Personal" view instead of creating a "Public" view !  "Personal" view is i...

"Export to Spreadsheet" option in SharePoint list web part does not export all the columns

We all knew that the SharePoint list can be embedded in a web part page using the list web part. The list web part provides us with various properties which can be customized as per the requirement. One such property is the "Toolbar" . If "Show Toolbar" option is set, we would be provided with 3 tabs namely "New", "Actions" and "Settings".  The list data can be exported to an excel using the "Export to Spreadsheet"  option found under the "Actions" tabs.  Now here is the issue, suppose we have 10 columns in the list and we would like to show only 5 columns in the page, we would create a view in such a way that the page shows only the 5 columns.  If the data is exported from this page using the "Export to Spreadsheet" option, all the columns would definitely get exported, but the values would be exported only for those 5 columns which are shown on the page. This is because, the "Export to Spread...