Solved

Source code for InfoPath 2007 form

Posted on 2012-03-22
6
329 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
  • 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now