Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Source code for InfoPath 2007 form

Posted on 2012-03-22
6
Medium Priority
?
373 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 1000 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 1000 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

719 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