Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Working with Infopath 2010 here and SP 2010.

I've created my form and published it while in DEV. Now, I want to publish it to the Prod Location. Here's the issue and to me, quite strange.

I can't republish to another location. Normally, I just used the Quick Publish option which republishes to the same location.

Now, I click File Publish.

I have two options Here: "Sharepoint List" and "Export Source Files".

The "Sharepoint List" option is the obvious one, but here's the catch... It remembers the Quick Publish Location and even has a Label stating: "The form will be published to: http://blablabla"

Clicking on the Button, just does EXACTLY the same as Quick Publish.. It does a quick publish without bringing up the wizard to choose the publish location.

It seems sometimes MS tries to be too clever with the ribbons and the menus...

Am I missing Something??

How can I bring the wizard back up to change the publish location?

Thanks

share|improve this question
    
The marked as best and the most upvoted here answers proposing the use UDCX data connection files are not applicable to Infopath Form templates of type/compatibility Sharepoint List Form and Workflow Form at all. The best answers should have been describing the hacking of template's source files which are unfortunately the less voted here –  Gennady Vanin Novosibirsk Oct 5 '12 at 8:45
    
About the File -> Publish answer, I do not know under what circumstances that the solution works. I followed the steps and no dialog box appeared. InfoPath immediately published the InfoPath form to the old site, which is production. I started the InfoPath editing from within SharePoint 2010 so maybe that makes a difference. I noticed the answer about saving as a new file, which I had done and it made no difference. –  user14983 Feb 18 '13 at 22:14
add comment

11 Answers 11

up vote 2 down vote accepted

Yes this is "by design". If you want to deploy a form to a different location, use Data Connection Files (.udcx). Here's a good article about how to create and use them properly. http://msdn.microsoft.com/en-us/library/ms772101.aspx

Now if you change the environments, you download the .udcx file from the DEV data connection library and change the ListId to the ListId of your PROD list, and upload the udcx to the data connection library of your PROD environment.

<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
        <udc:WsdlUrl/>
        <udc:SelectCommand>
            <udc:ListId>{Change Here}</udc:ListId>
            <udc:WebUrl>http://additportal/apps/addOffer/</udc:WebUrl>
            <udc:ConnectionString/>
            ....
    </udc:ConnectionInfo>

Then, if you re-publish, infopath will ask you if you want to adjust the the URLs

share|improve this answer
1  
Your reference cannot be applied to data connections on "Sharepoint List Form" Infopath form. The data connections for sharepoint lists are generated automatically (cannot be created manually by wizard), nonmodifiable and cannot be saved as UDCX file. –  Gennady Vanin Novosibirsk Jul 28 '12 at 3:50
add comment

I had the same problem and found out a way to solve it. I saved the form as source files, opened all the files in a text editor (in my case on Visual Studio) and replaced all URLs, used for publishing (actually in 2 files: manifest.xsf and view1.xsl).

After publishing it worked fine.

Good luck.

Regards, Pilan

share|improve this answer
    
I would have chosen it as correct answer –  Gennady Vanin Novosibirsk Jul 22 '12 at 14:36
add comment

Ok found the answer, but it's actually ridiculous!

The Option I took when creating the Form from Infopath Designer, was "Sharepoint List" template, which seems to be the cause of the problem, as it basically contraints you to working on THAT specific List in that specific Site. In Other words, you can't move the Template! Is that by Design? It would be shocking if it is...

Anyways, A workaround, is to save your List as a template and create it somewhere else. You can now also Download the form again from the newly created list and modify it as you want.

Can't find any docs from MS which describes this behaviour, so i'm sure it's a Bug.

share|improve this answer
    
The content of lookup fields is lost at such moving if it is through STP files (to another site collection) –  Gennady Vanin Novosibirsk Jul 28 '12 at 10:23
add comment

I found the best approach. It may be little manual but worth it (at least try it once).

  1. xsn files are basically a cab files with bunch of related files in it.
  2. rename xsn to cab and extract to a location (alternatively you could from infopath file > publish > export source files)
  3. Fix the manifest file for new target location
  4. Re-create the cab file (makecab command)
  5. rename cab to xsn

Here is a good article. http://sharepointkb.wordpress.com/2009/01/24/modifying-xsn-files-infopath/

share|improve this answer
    
+1 though I think you missed the stages of saving template locally, then republishing it while the stage of re-creating the cab file is unnecessary since it is being done under the hood by publishing and manual replacing the template.xsn will not work, in my experience –  Gennady Vanin Novosibirsk Jul 22 '12 at 14:35
add comment

Ok, so you have all got it wrong because you dont understand the difference between code and content. This is partly MS fault for constantly ignoring the fundamental separation of code and data - classic case in point is ASP vs ASP.net. In ASP code was embedded in the data (or html content), but MS mostly fixed this in ASP.Net with the concept of code-behind.

In Sharepoint 2010 Code and Content separation is rigorously imposed by the science of Document Management but which totally confuses MS developers! To be clear Code can execute in the Sharepoint Application itself (SPTimer Service), everything else is Content.

So, is template.xsn code or content? You think its Code dont you? WRONG!!! It is NOT CODE. Template.xsn is CONTENT because it runs on a client (InfoPath Filler or InfoPath Forms Service). And do you Deploy content ? No. You PUBLISH content.

So right from the outset, developers incorrectly bring their DEV/TEST/PROD thinking to InfoPath. Instead you should realise you are working with Content in PROD, and be thinking AUTHOR/APPROVE/PUBLISH. As an AUTHOR you should not, Not, NOT!!! have access to Central Admin. If your PM or Admin has setup DEV/TEST/PROD environments for your InfoPath "development" your Sharepoint project is in serious jeopardy because they simply dont know what they are doing. You will never convince these guys that you are not "developing" in PROD. Tell them that InfoPath PUBLISHES only TIGHTLY MANAGED CONTENT and does not allow any UNSAFE client Code to execute on the server without Farm Admin deployment. Good luck with that!

Bottom Line: InfoPath and Sharepoint Designer are Content Editors just like Word and Excel. They are not Development tools. They are screwdrivers not hammers. Stop trying to hammer your Content (screws) into Sharepoint as if it was Code (nails).

  1. use Sharepoint Designer (SPD) to open the PROD site
  2. copy the current template.xsn to a new file in the same location.
  3. edit the new file in INfoPath by double click from SPD
  4. When done publish the new file (it will go to the same Sharepoint List location in PROD)

Job Done.

  • If recovery is needed, simply repeat steps 1-4 on the original template.xsn ** Once you have this mastered, try versioning check-in/out instead of copy. ***This is how you SHOULD be using InfoPath/Sharepoint Designer/Word/Excel (etc).
share|improve this answer
add comment

I came across this thread, when encountering the same problem, and unfortunately for existing forms I could not get any of the solutions to work absolutely correct, so had to redesign from scratch. However as I am working more in InfoPath all the time and have to share variations of the same forms around - I thought I would give my non tech solution.

I create a read only copy of the form without any publish location - and then use this as a master template. I can then publish a copy of this form with the location to where needed as I have the master copy still intact.

Hope this helps

share|improve this answer
add comment

Save the form as a new file and just change the submit options to point to a different list.

share|improve this answer
add comment

If you are working with InfoPath List form, you can not change publishing options from within InfoPath. Usually this means that you should create new InfoPath form and manually create all rules and controls using the previous form as an example.

Howewer, infopath xsn form is a cab file, wich contains multiple xml files. The file manifest.xsf inside that cab archive contains info about publishing options. If you really need to change publishing url, you may dig in that direction.

Below I post my steps to achieve this. I cannot guarantee 100% result, but it worked for me:

  • Save infopath form on your hard drive
  • Change extension of the saved form from xsn to cab and unpack its content
  • Find the manifest.xsf file and change it as follows:
    • The baseUrl tag, relativeUrlBase attribute: set the url of another list. There must be absolute url which points to specific content type folder (e.g. for Tasks list it should be http://weburl/Tasks/Task
    • Find the sharepointListAdapterRW tag with name="Main Data Connection" attribute and change its attributes as follows:
      • sharePointListID attribute to Id of your new list. You can find Id of the list with tools like Sharepoint Manager 2010.
      • contentTypeID attribute (if it differs) to the content type id of your new list.
      • siteURL to absolute url of the web, containing your list (e.g. http://site/web1/web2/)
      • relativeListUrl to the web-relative path of your new list, e.g. Lists/Tasks
  • Compress files in cab archive, (I myself used cabpack for that purpose) and set its extension to xsn.
  • Open compressed xsn with InfoPath designer, click "Refresh Fields", check that the form is ok, save it and publish it. It should be published in new location.
share|improve this answer
1  
No need to compress files in archive, just open manifest.xsf in Infopath Designer, save as XSN and publish, to a changed location –  Gennady Vanin Novosibirsk Jan 9 '13 at 9:46
    
Thank you, I didn't know about it –  Egor Emelianov Jan 9 '13 at 10:02
    
In my answer I adressed how to submit to multiple sharepoint lists since this workaround permits to change the publish location, but it does not enable to submit the same form to various/multipe (or more than one) sharepoint lists –  Gennady Vanin Novosibirsk Jan 9 '13 at 10:20
    
To moderator: I've made edits ("This is my answer to another, similar question") to this answer by mistake (having though that I was editing my own answer)!!!! Please don't approve them! –  Gennady Vanin Novosibirsk Mar 10 '13 at 3:36
add comment

If you publish to a Document or Form Library, I found the option to change this easily. I had the same problem and initially I thought the solution would be complicated as Gennady explained, but after seeing this then I was able to change the publish location quickly. Go to File->Publish as you said but then find the "Publish Form to a SharePoint Library" option with the "SharePoint Server" button to the left of it, from there you get back to the original publishing dialog where you can input your new destination location.

share|improve this answer
add comment

This is my answer to another, similar question, that was removed and my answer migrated here, so having made my answer repeating previous answers


You can submit from the same Infopath form to multiple sharepoint lists though, for this, one should avoid using Infopath form template of type/compatibility Sharepoint List Form. I.e. you should avoid generating IP form template by pressing Customize button in browser or Sharepoint Designer or by pressing Sharepoint List button in Infopath Designer File > New > Sharepoint List. Use any other IP types of form templates

Also, check:

share|improve this answer
add comment

Another option that seems to have worked for me is this:

Create a template of the list from the development environment.

Create the list in the production environment using the new list template.

Create a new form in InfoPath selecting "SharePoint List" as the type.

Set the location of the SharePoint site as your production site which contains the new list.

Choose "Customize an existing SharePoint List" and select the list you created from the development list template.

InfoPath will open the list and its existing InfoPath form. You can now save this InfoPath form as the template for your new list location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.