Thursday, August 26, 2010

Infopath form cannot save the following form - Form is Read Only

I have created the infopath project in Visual Studio and deploying into SharePoint environment. After some days, I got to change the infopath form to match the new requirement and redeploy to the SharePoint environment. I have opened the Visual Studio and spent half an hour to edit all the changes and tried to save the form. But, while saving it was started giving me the alert message that "The infopath form cannot save the following form: Template Name is ready only." I did not understand and check all file properties of the manifest.xsf and unchecked the checkbox read only. Still it was giving me the same error message. The error message was completely confused me and no any other clue. So, started searching in internet for the solution and after searched about an hour, found the information. If you have opened the infopath form, then close it. [No other way, you will lose all changes you have made.]

Resolution:
  1. Open the manifest.xsf in notepad.
  2. PublishUrl: Search for "publishurl". I believe, this pointed to the old location other than what actual the form is submitted to. Make it empty [No problem].
  3. runtimeCompatibilityURL: in the notepad, search again for "runtimeCompatibilityURL". Now change its value to "http://sharepointserver/_vti_bin/FormsServices.asmx". 
  4. If you are using the source control like VSS, Source vault, TFS or whatever then you have to do below things.
  • Open Visual Studio and checkout all the files in the Infopath Form Template folder.
  • Once all checked out, then close the Visual Studio and reopen.
    Note: replace sharepointserver in above url with your sharepoint server name.

    Check for more information here. MSDN
    That's it. Now, you have to reopen the file and do whatever changes you have to do. Enjoy.

    2 comments:

    1. Hi Praveen ,

      This was quite some info.
      I have tried publishing a infopath form after designing it in my VPC and when i tried publishing it to a site's form library it says that the URL is invalid.
      I have tried giving different parts of the URL but still fail to publish to the site.Im sure about the URL of the URL of site.

      Can you please suggest if you have a clue on why this could happen ?

      Thanks for your help in advance!

      -Akhila

      ReplyDelete
    2. Hi Akhila,
      I know this is a problem to most of the people in SharePoint.
      Answer me below questions.

      The SharePoint site is on port 80 with hist header?

      The SharePoint site is in the same domain?

      The SharePoint site is accessible from the infopath form developed server?

      -Praveen.

      ReplyDelete