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...
Related
I wondering if its possible to use Microsoft Word as a text editor in a VB.Net project?
My project currently uses a Rich Text Box to allow the user to right a report which is then saved and a report generated. I was wondering if i could switch to Word for better formatting and layout options, be it embedded in the actual form or in another form thats called (if that makes it easier to assign the control).
I have worked on opening Word itself via a button click but would like to have it incorporated in the project. All users that would actually use the program would have one of the more recent versions of word installed.
Any pointers to websites would be great as i'm constantly searching but not getting very far
Thanks
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
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.
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
How to programmatically get at outlook form code?
To clarify from one of the comments - Outlook form code is the VBA code that sits behind the form - it can be customised in the form design mode to do pretty much what the user needs to do.
Our product relies heavily on form code, but certain bits of it need to be customised per installation. We are looking for some way to automate this process, as we have upwards of 30 custom forms it is a tedious process to do it manually...:-)
Use a configuration file (use ReadFile etc)
Or put the configuration information in a "special" item in a public shared folder
You can also use the "Office Profile Wizard" to package it up with a custom vba module iwht the configuration information in that
You should never write out customised code, that is a big can of worms