Browser-Enabled InfoPath form doesn't open in web-browser - sharepoint-2010

I am using SP2010.
I am having .xsn file and its just simple with one field.
I have already set VSTA project & code for this form. I have not written any thing in C# code for VSTA its just simple.
I do design check and publishing to a document library, its successfully done. my InfoPath forms's security level is "automatically determine...."
My issues are below:
But when i open my custom document library and and try to add any item New Form is not opening in browser. this just opens in InfoPath design form. how i can open it in web browser.?
How i am going to debug this code created in VSTA project ?.

in reply:
check file/form option/compatibility/form type is Web Browser Form. or you can remove code behind of infopath template.
for debugging VSTA project see this link

Related

Location of Infopath Custom Code on SharePoint

I have an Infopath 2010 form that's been developed for a document library in SharePoint 2010. The form contains custom VB code, which is saved on a shared drive.
However, should the VB project on the shared drive get deleted/damaged/forgotten about, is there a way to retrieve the custom code from SharePoint itself? I know you can go to Library Settings>Advanced Settings>Document Template>Edit Template to retrieve the Infopath form, but when you attempt to edit the custom code, Infopath asks for the VB project location.
Does a plain-text, uncompiled version of the code get stored somewhere in SharePoint when the form is deployed?
When I have needed to get the code for a form and don't have access to original code files, one approach I have taken is to save the form as source files (either unzipping the template with a tool like 7-zip or from the publish menu in InfoPath in design mode) and then decompiled the code DLL with ILSPY. Imperfect & a bit of a pain, but has allowed me to see what may be going on in a template file and recreate the source code when needed.
Found my own answer - looks like I'd be out of luck.
http://www.bizsupportonline.net/blog/2013/recover-make-changes-infopath-forms-sharepoint.htm
Paragraph at the bottom just before "3 ways you can find out whether code was written for a form template"
That's a pretty helpful feature, Infopath...

Form won't open in Sharepoint Designer 2010

I'm using Sharepoint Designer (2010) to develop a series of connected lists.
I have a number of child-lists and I use the "DispForm.aspx" of my main list to add these 'children'.
Recently the DispForm.aspx has stopped opening in Sharepoint Designer. Clicking it from the list's main page goes into the Form view, but the page never loads and I get no error messages.
Since I can't see the Code window I can't make any changes, even though the page works fine in the browser and I can perform (limited) edits directly on the website through Sharepoint.
Has anyone got any tips on what I could try, or any way of accesing the code in DispForm.aspx if I can't open it in Sharepoint Designer?
Not a fix as such, but I got around this by mapping a drive to the sharepoint site and using notepad++ to edit the file directly.
If you browse the lists folder and the list you are interested in you will see the display, new, edit forms in there
S

How to reconnect InfoPath task form to SPD workflow after moving it to the new Site Collection

I have Globally reusable workflow (created in SPD) in my test site collection. This WF uses custom InfoPath task form. Now I am trying to move it to the new production site collection. I've done next steps.
Copy my globally reusable WF (in SPD) to make it reusable (I can't save GLOBALLY reusable WF as a template).
Save new reusable WF (not globally reusable) as WF template and deployed it to the production environment.
And now my WF is working well, but I've missed my custom InfoPath task forms and I don't know how to connect it to my WF.
Is there any way to reuse InfoPath task forms from my workflow after moving from test environment to production? May be I have to use another approach?
Every suggestions are very appreciated. Thank you very much in advance.
PS: I don't understand completely what is happenning behind the scenes, when I am creating custom InfoPath task forms in SPD. I googled about it, but couldn't find any good article to clarify. If you know any articles or books which could help me in my understanding of relationship between InfoPath and SharePoint 2010, it would be great if you recommend it.
PPS: SharePoint 2010.
UPDATE 1: It seems like InfoPath forms are missed in step 1 (I can't see forms in wsp file). If I create new reusable WF (not globally) with InfoPath forms, I can see them in the wsp file and WF deploys correctly with forms.
It seems like the way which Microsoft recommends for converting Globaly reusable WF to reusable WF doesn't work well and miss InfoPath task forms.
Also I found an unanswered question about the same problem on MSDN forum.
Thanks to Gennady Vanin, who helped me to find a solution.
To reconnect InfoPath form we can use the next approach:
1. Export source files of the form.
Open form in InfoPath designer. And because we can't republish it to the different place using wizard (its type is a Workflow form), we should Export source files (from the menu File\Publish) to some folder.
After this step we received a set of files, one of which is "manifest.xsf".
2. Close InfoPath designer.
3. Correct URLs in manifest.xsf
Open "manifest.xsf" in a text editor. Find all URL related to the first site collection and replace it with new URLs linked to new site collection. Save the file.
Hint: If you don't know the URL to publish in new site collection, you can open autogenerated form from it in the same manner (look at URLs in its manifest.xsf).
4. Publish changed form.
Open InfoPath designer, open corrected manifest.xsf in it and publish it (by pressing the publish button for example).
5. Hurray! The form is deployed to the new place!
You should repeat this steps for all custom InfoPath task forms in your workflow.
If somebody needs more detailed description, I could add screenshots.

Creating and deploying infopath forms in in sharepoint 2010 form libraries

I have created infopath form library in SharePoint sever2010. I am using Windows server 2008R2 OS and MS-Office 2010. When i clicked on "Add new document" in form library, it is asking a .xsn template.
I created a template using infopath 2010 and assigning to it.
But it is saying that:
The element 'comment' is used but not declared in the DTD/Schema..
I tried to publish it by using Infopath 2010, it is saying that :
The element 'comment' is used but not declared in the DTD/Schema.
again.
Can any one explain the procedure how to solve these errors....
This error could occur if:
The template you created with InfoPath designer is not published to SharePoint - therefore when you click New -> New Document, you are asked to provide a template to use. Now if you supply any arbitrary template, you will get this error.
You can try following steps:
Publish the template you created to sharepoint Server. Check 'Enable this form to be filled by browser'.
You said very simple template so I am assuming there is no custom code associated.
Select publish to form library. Create a new form library, if not already done so; else use existing form library.
If you create new Form library from InfoPath, things are easy, when you click on 'new document' in your 'form library', you will see the form in browser.
If you publish to existing Form Library then follow these steps:
In your form library click settings -> Advanced settings.
Select 'Yes' for 'Allow management of content types?'.
For 'Default open behaviour for browser-enabled documents:'
Select Use the server default (Open in the browser).
Click Ok.
Back on the settings page you should see: 'Add from existing site content types' in the 'content type' section. Click it and on the ' Add Content Types' page select group 'Microsoft Office Infopath' or 'Microsoft Infopath', which ever your content group is, and you should see the name of your form. Add this and click ok.
Back in your Form Library, you should see two InfoPath forms on your New button.
Well that's that, you can get rid of one of them.

Create external list forms using infopath

I am trying to create external list forms using InfoPath.
I have aready been able to do following in this process:
1. Create External Content Type using sharepoint designer
2. Create External List using sharepoint designer
Now I am trying to modify forms (submit and retrieve forms) using InfoPath. I am following the following link http://msdn.microsoft.com/en-us/library/ee554886%28office.14%29.aspx.
But in the design checker task pane I see a warning saying "Could not verify the form template on the specified server". I cannot find anywhere in msdn or google addressing this warning. Inspite of this warning i tried to quick publish the form, and then i get an error saying: "The form template has been published to the server but it can only be opened in the InfoPath Editor because it contains feature that are not compatible with web browsers, to fix this problem, click close and review the errors in the Design Checker task pane"