sharepoint-2010infopath2010

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?


Solution

  • 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.