Solved

Source code for InfoPath 2007 form

Posted on 2012-03-22
6
351 Views
Last Modified: 2012-12-02
I inherited a SharePoint site with an InfoPath 2007 form. I was able to download the form .xsn file. I see there is a lot of logic in the logic viewer. How do I obtain the source code project for the form. Is this project compiled once the form is published?
0
Comment
Question by:wn411
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 28

Assisted Solution

by:clayfox
clayfox earned 250 total points
ID: 37752988
If you open in design mode, you can edit the logic, the layout, and potentially the code. In options you can see the type of code it uses.  If managed code you can use visual studio, if java or vbscript you can use the standard editor.

You can also export source files to be able to open the component files in notepad and see the XML.

The xsn file is essentially a cab file of all of the XML, XSL, manifest, components of the form solution.

When you publish, it repacks them all together and sets the location where they are hosted.
0
 

Author Comment

by:wn411
ID: 37753230
Yes I opened it in design mode. But I do not see any VB or C# code in a project. I also checked rules. The only thing I see is in the logic window.

I also save the components of the XSN using the File Menu. I looked at all the XML etc. But I did not see any code.
0
 
LVL 6

Accepted Solution

by:
livanescu earned 250 total points
ID: 37779537
open in an xml editor the xsf file extracted from the xsn.
all the information is stored here in xml format (typical for xml!):
 - xsf:package is a list of all the files included
 - xsf:extensions contains details about offline-capabilities, views restrictions and sharepoint form library associations
 -xsf:views includes details on each view of the form (same data displayed in various ways - these views are the .xsl files in the package); the details are buttons (unbound controls), optional sections (xml fragments added at runtime), special handling of text fields (such as proofing, multiline etc), context menus (actions such as adding, removing optional sections) and print settings
- xsf:ruleSets describes rules that you've seen in the logic window
- xsf:dataObjects identifies external and internal  data connections
- xsf:domEventHandlers is identifying the field which value change will represents an event that will trigger the execution of a certain ruleSet
- xsf:customValidations contains the list of conditional validations generating errors
- xsf:calculations will provide you with the list of fields that have values calculated at runtime
- xsf:listProperties describes the  promoted fields and their association with SharePoint form library columns
 - xsf:dataAdapters will give a list of submission methods used

Detailed definition (with some errors):
infoPath XSF Core Schema Diagram
http://msdn.microsoft.com/en-us/library/bb230362(v=office.12).aspx

InfoPath 2010 Dev reference (downloadable file)
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15161
0
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 

Author Comment

by:wn411
ID: 37782821
Thanks. Would this include any C# or VB Code if that was used in the form?
0
 
LVL 6

Expert Comment

by:livanescu
ID: 37783865
xsf: script will tell you what was the script language set - if any - and the script file; look for .js, .dll and .exe in the list of files (js is JavaScript - typical for IP2003; dll/exe will probably define a Visual Studio project - typical for IP2007/2010); if none, there is a distinct possiblity that no code was ever created.

InfoPath can emulate/implement business logic with zero code. Which is practically one of its'  main strengths.
0
 

Author Comment

by:wn411
ID: 37787484
Right, I just want to confirm that there is not a way I can get the source code if the original developer used C# or VB. In that case, I will make the case that we need to get the source code from the developer.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question