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 siteURL, sharePointListID, relativeListURL parameters of the sharepointListAdapterRW area for each data connection. Please note that here, the relativeListURL is like Lists/<ListName>
3.6.At the end of the file, there will be a section <xsf:query>. Update the sharepointListAdapterRW parameters for siteURL, sharePointListID, relativeListURL as well as contentTypeID.
Here’s what it looks like after updating.
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!!!
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 siteURL, sharePointListID, relativeListURL parameters of the sharepointListAdapterRW area for each data connection. Please note that here, the relativeListURL is like Lists/<ListName>

3.6.At the end of the file, there will be a section <xsf:query>. Update the sharepointListAdapterRW parameters for siteURL, sharePointListID, relativeListURL as well as contentTypeID.


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
Post a Comment