Posts Tagged ‘Infopath forms’


You want the default Add/Edit/Display forma of a SharePoint list to be customized using Infopath. Open the list, under the List header in the ribbon, you select Customize  Form option which opens your list form in Infopath designer. You  start editing it and once you do all the changes, publish it to see the changes in the list.

Now you want to deploy the same file to a different list in the same site or a different site. In the Infopath designer, under File menu select publish, you would be able to see the publish URL. You need to change this URL to point to your new list location. But unfortunately you cant do this anyway in the designer. You need to update this URL manually by updating the manifest file of the Infopath form. Below are the steps you need to follow..

  1. Under File menu select Save As option to save the Infopath form. You will be saving a .xsn file(In My case file name is Template.xsn).
  2. Now rename the file from .xsn to .cab(Template.xsn to Template.cab).
  3. Extract the file using winzip to a folder(My folder name is Template).
  4. In the files extracted open the file Manifest.xml.
  5. Search for your current site/list URL and replace it with the new site/list URL.
  6. Now we have the manisfest file updated pointing to the new site, we need to to make a cab file out of the extracted files.
  7. We will be using makecab.exe tool to create the cab file. I need to create a directive file. Below is the content of my ddf file(ddf.txt).

    ;************************************************************
    ; MSDN Sample Source Code MakeCAB Directive File
    ;************************************************************
    .OPTION EXPLICIT.Set CabinetNameTemplate=NewTemplate.XSN

    ;*****************************************************************
    ; Change DiskDirectoryTemplate to where you want the CAB/XSN saved.
    ;*****************************************************************

    .set DiskDirectoryTemplate=”C:\Users\chanakya.jayabalan\Desktop”
    .Set Cabinet=on
    .Set Compress=on

    ;*************************************************
    ; List all the files to add to the cab/xsn
    ;*************************************************

    “C:\Users\chanakya.jayabalan\Desktop\Template\Choices Data Connection.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\choices.xml”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Client Assurance.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Client Assurance1.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Client Assurance2.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Client Assurance3.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Client Assurance4.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Concepts, Programs, Projects and Initiatives.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Concepts, Programs, Projects and Initiatives1.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Concepts, Programs, Projects and Initiatives2.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Concepts, Programs, Projects and Initiatives3.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Concepts, Programs, Projects and Initiatives4.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\manifest.xsf”
    “C:\Users\chanakya.jayabalan\Desktop\Template\NewItem.xsl”
    “C:\Users\chanakya.jayabalan\Desktop\Template\SA Team.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\SA Team1.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\SA Team2.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\SA Team3.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\SA Team4.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\sampledata.xml”
    “C:\Users\chanakya.jayabalan\Desktop\Template\schema.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\schema1.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\schema2.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\schema3.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\schema4.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\template.xml”
    “C:\Users\chanakya.jayabalan\Desktop\Template\upgrade.xsl”
    “C:\Users\chanakya.jayabalan\Desktop\Template\view1.xsl”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending Sorted5.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending Sorted6.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending Sorted7.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending Sorted8.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending Sorted9.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending1.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending2.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending3.xsd”
    “C:\Users\chanakya.jayabalan\Desktop\Template\Week Ending4.xsd”

    ;*****************
    ; End Of The File
    ;*****************

  8. Run the command makecab.exe \f  C:\Users\chanakya.jayabalan\Desktop\ddf.txt.
  9. NewTemplate.xsn is the new template file that will be created.
  10. Now right click this 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.