Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Source code for InfoPath 2007 form

Posted on 2012-03-22
6
Medium Priority
?
382 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 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
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

 

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] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

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…
Did you know there are services out there that can turn an Instagram feed into an RSS feed? I found some interesting exclusive Instagram content which I wanted to follow without signing up for yet another social media account. RSS to the rescue!
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

916 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