Using InfoPath Designer, we cannot change the publish URL, If you want to deploy the InfoPath form from one list to another list in the same site or a different SharePoint site hence you need to update the publish URL manually by updating the manifest file of the InfoPath form.
Below are the steps to UPDATE Manifest.xsf file:
- From the source list Open the InfoPath form using designer and go to File menu, select Save As option to save the InfoPath form. You will be saving a .xsn file.
- You cannot use the old form as-is, because it was bound to the list by its GUID, and the new list most likely has a different GUID.
- Rename the file from .xsn to .cab(Template.xsn to Template.cab).
- Extract the file using Winzip to a folder.
- Go to the extracted folder and open the file Manifest.xsf.
- Search for your current site/list URL and replace it with the new site/list URL.
- In addition to changing the site URL in this file, you will also need to change the GUID of each list referenced in the InfoPath form so that it matches the value in the target environment. To do that, search for all lines in manifest.xsf with "sharePointListID=" and change the GUID that follows.
- You may also need to change the GUID value(s) for content types as well. Search through the manifest.xsf file looking for non-null values following "contentTypeID=" and change them to the GUID value in the target environment as well.
Note: To find the correct GUID of the List, ContentTypeID you will need to go to the target list --> Click on "Customize in InfoPath" from list tools, and do Save As to save the InfoPath Form. Once you save the form you can change the extension to .cab and extract the CAB file. From the extracted folder you can Open the target list Manifest.xsf file in notepad and note the GUIDs of the Lists and ContentTypeID.
If you are using Modern view then you need to navigate to List Settings--> form settings and follow the same instructions.
9. Now we have the updated manisfest file which is pointing to the new site. Now we need to make a .XSN file out of the extracted files. You can use CabMaker tool to create the .xsn file
Download the tool from : https://github.com/sapientcoder/CabMaker/releases
10. Now right click on .XSN file, select design & under File menu select publish. Now you would be able to see the publish URL pointing to your new site/list.
11. Go ahead and publish the form.
If you don't have the MakeCab tool then you can create the XSN file from the extracted folder using makecab.exe from the command prompt. Below is the content of directive file(ddf.txt)
;************************************************************; MSDN Sample Source Code MakeCAB Directive file example ;************************************************************ .OPTION EXPLICIT; change the value of the caninet name for example myInfoPath.xsn;***************************************************************** ;******************************************************************; change the value of the Disk Directory Template value to the directory you want to store the xsn file into,,.Set CabinetNameTemplate=NewTemplate.XSN ;********************************************************************************************** ;********************************************************************************************** .set DiskDirectoryTemplate="C:\Users\Liakath\Documents\InfoPath" .Set Cabinet=on .Set Compress=on"C:\Users\Liakath\Documents\InfoPath\Template\Audit Results5.xsd";******************************************************* ; Just List All the files to be added in the xsn file ;******************************************************* "C:\Users\Liakath\Documents\InfoPath\Template\Audit Results6.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Choices Data Connection.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Audit Results7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Audit Results8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Audit Results9.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\choices.xml" "C:\Users\Liakath\Documents\InfoPath\Template\Close.xsl" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo10.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo11.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo12.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo13.xsd""C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo9.xsd""C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo14.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo15.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo6.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\EmpInfo8.xsd""C:\Users\Liakath\Documents\InfoPath\Template\FormTypeSelection.xsl""C:\Users\Liakath\Documents\InfoPath\Template\ExpenseCodes5.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\ExpenseCodes6.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\ExpenseCodes7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\ExpenseCodes8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\ExpenseCodes9.xsd""C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypeAdmin.xsd""C:\Users\Liakath\Documents\InfoPath\Template\GetUserProfileByName1.xml" "C:\Users\Liakath\Documents\InfoPath\Template\GetUserProfileByName3.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\GetUserProfileByName4.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\GetUserProfileByName5.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Liability.xsl""C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypes1.xsd""C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypeAdmin1.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypeAdmin2.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypeAdmin3.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypeAdmin4.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypes.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Office Number Translation7.xsd""C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypes2.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypes3.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\LiabRequestTypes4.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\manifest.xsf" "C:\Users\Liakath\Documents\InfoPath\Template\Office Number Translation5.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Office Number Translation6.xsd""C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypes3.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Office Number Translation8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Office Number Translation9.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Property.xsl" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypes.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypes1.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypes2.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypes4.xsd""C:\Users\Liakath\Documents\InfoPath\Template\schema.xsd""C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypesAdmin5.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypesAdmin6.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypesAdmin7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypesAdmin8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\PropRequestTypesAdmin9.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\sampledata.xml" "C:\Users\Liakath\Documents\InfoPath\Template\Save.xsl" "C:\Users\Liakath\Documents\InfoPath\Template\schema1.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Suspended Reason6.xsd""C:\Users\Liakath\Documents\InfoPath\Template\schema2.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\schema3.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\schema4.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Status.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Status1.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Status2.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Status3.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Status4.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Suspended Reason5.xsd""C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypes9.xsd""C:\Users\Liakath\Documents\InfoPath\Template\Suspended Reason7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Suspended Reason8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\Suspended Reason9.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\template.xml" "C:\Users\Liakath\Documents\InfoPath\Template\upgrade.xsl" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypes5.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypes6.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypes7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypes8.xsd";*********************"C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypesAdmin10.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypesAdmin6.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypesAdmin7.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypesAdmin8.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WCRequestTypesAdmin9.xsd" "C:\Users\Liakath\Documents\InfoPath\Template\WorkComp.xsl" ;********************* ; End of the File
No comments:
Post a Comment