.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Extracting Infopath form templates (with code behind) from a farm

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint
 

Hi,

I am in the middle of a migration of MOSS 2007 on server 2003 R2 to server 2008 r2, to be in the position to migrate to SP 2010. I am trying to extract form templates (with code-behind) from the old farm to the new farm. I did not set this farm up myself, so I would have copies of everything that was deployed to the farm, but now I don't. I have tried grabbing the .xsn from the Form Templates form library, and the form comes over, but no code behind, it says, The VB or C# project for this form template cannot be found. I have also tried extracting the solution files, and changing the file ext to .cab and opening the file up, only to find nothing very useful.

I need to extract and open the code up because I believe one of the forms that sends emails dynamically, is pointing to an old exchange server, because the emails are not getting through, and the exchange server was recently changed.

Any ideas would be much appreciated.

 




View Complete Post


More Related Resource Links

InfoPath 2007: Designing Form Templates With The New Features Of InfoPath

  

InfoPath 2007 is an XML forms designer and editor, and a fully featured and integrated member of the Office family. This article takes a sneak peek at some of its new features.

Scott Roberts and Hagen Green

MSDN Magazine August 2006


Infopath form return XMl code during workflow task

  

1.     Review 7777.xml.

2.     Perform the specific activities required for this task.

Use the Edit this task button to mark the task as completed. (If you cannot update this task, you might not have access to it. Click here to request access.

Best way to Deploy InfoPath form with connection information and managed code

  
Hi, Whats the best way to deploy an InfoPath form with connection information and managed code. Is there way I can create a deployment package for this? Thanks in advance, San

Get ListItemID in code behind an InfoPath Form

  

I have a few cases where I'm using an InfoPath form in a SharePoint list (for instance, as the default content type, so that clicking "New" in a Document Library opens an InfoPath form in the browser).

In the form's code-behind I would like to programmatically create a new item in another list, setting a Lookup Field's value there to the ListItemID of the item associated with the open InfoPath form. But I can't find any way to identify the ListItemID (or GUID) of the InfoPath form.

Does anyone know how to get the ListItemID of an InfoPath form in a SharePoint list, from within the InfoPath form's code-behind?

Thanks!


InternalStartup method erro when publish InfoPath form with custom code

  

Hi All,

I created a SharePoint Form Library, and added a button in the form. Then, by following the steps of adding custom code. I was trying to add codes to the button click event in VSTA. When I try to publish this form to my SharePoint library, I got an error message say:

"The form template has been published to the server but it can only be opened in InfoPath Filler.

There is an error in the InternalStartup method of form code.

There may be additional error detials in the Design Checker task pane."

However, I did not make any changes to the InternalStartup. and then I tried to create another SharePoint Form Library Form in InfoPath Designer, and just add click event, but did not input any code, I got the same error. So I believe this is caused by either environment or the configuration of SharePoint Server. Could anyone help me out? Thanks!


Get Infopath form URL from code C#

  

Hi

I need to include a hyperlink on the print view of an Infopath form. Now this is all good.

The problem is that the form does not close when submitted and then gets emailed to where it needs to go, so the url does not refresh. What I have done is to request the url:

XPathNavigator xnMyForm = this.CreateNavigator();
      XmlNamespaceManager ns = this.NamespaceManager;

      string strURL = HttpContext.Current.Request.Url.ToString();
      xnMyForm.SelectSingleNode("/my:myFields/my:secHidden/my:txtURL", ns).SetValue(strURL);

And then I set the hyperlink to the txtURL datasource.

So what happens is that when the email is sent without closing the form and reopening it and clicking on the hyperlink, I just get a new blank form. Only when I close the form and reopen it do I get the form that was submitted.

How can I get the datasource to refresh with the new url that is created for the specific saved form? Is there a place where it is saved? I have checked in the xml source of the saved form but I cannot see anything there..!


Infopath form timesheet question on rounding time and using code

  

We have a timesheet form that has 4 time fields:  Start Time, End Time, Actual Time and Billable Time. 

Our Start Time, End Time and Actual Time buttons and field calculations work just fine, but we want the 4th field to calculate the billable time by rounding UP to the quarter-hour.

For example:

Start Time - 9:00am

End Time - 11:20am

Actual Time -  2:20

Billable Time - 2:30 (or 2h30min)

 

I'm new to Infopath and not sure how we would accomplish this.  What type of code would I need and can I even use code on that Billable Time field to accomplish this?

 

Thanks for any help you can give me!

 


is there a way to populate an infopath form with just plain code?

  

I'm what you consider a n00b - i've only done some basic stuff with sharepoint - debugged some stuff, but now i need to find if something's possible.

 

Here is what i have:
1) I have an infopath form that is hosted on our sharepoint site
2) I have a workflow that routes emails and all that fun stuff and allows end user to "complete" a workflow.

Currently users start workflows in their browsers.

Here is what i need to do:

I have created a webservice to which i will have my users send me information (same information as the infopath form collects today)

but with the twist that i will have some sort of a web app that will PUSH this information and "fill out" the infopath form thus starting the workflow process - this all to be done in the background.

My infopath forms information is stored as .xml files within sharepoint - and i'm not sure how i can create these without physically opening up the form in a browser - instead just send information to the form and POOF have it start the logic of the workflow.

Is this possible? 
Please point me in the right direction 


Infopath Form Services 2007 pass URL from one XSN to another without code

  

Is it possible to pass the current URL value in an opened Infopath Form to another Infopath form withouth using code? Basically I am trying to pass variables from one XSN to another & the requirements are such that I cannot combine the forms & I am unable to use C#.

Just wish I could get a handle on the Site Referrer value out of the box in Infopath without code. Javascript might be ok if I can embed it in the XSN file and then somehow call it from the XSN file on submit. Is that even possible? Or can this be done without code at all?


Problems with InfoPath form with code to deploy in SharePoint 2010

  

 

I try to deploy a form in sharepoint 2010 that will be used by the workflow as Task form. The form is deploy with the feature (in the folder of the feature). This form has strong assembly and it is installed in the GAC. However looks like the form look the assembly in the folder of the features how Can I make teh form to look the assembly in the GAC??

I use infoPath 2010, VS 2010 and SharePoint 2010.

Thanks for your help!!

 

Could not load file or assembly 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\[FeatureName]_Feature1\Forms\[AssemblyName].dll' or one of its dependencies. The system cannot find the file specified.


Deploying Infopath 2010 form with code to sharepoint 2010

  
I have created infopath 2010 forms with custom code and I want to publish these forms as the web browser form. I can preview these forms and everything is working fine.  But when I try to upload  (full trust option) these form templates in the central administration I get the error Object Instance is set to null. Does anyone have an idea what can be the cause of it?

Problems with InfoPath form with code to deploy in SharePoint 2010

  

 

I try to deploy a form in sharepoint 2010 that will be used by the workflow as Task form. The form is deploy with the feature (in the folder of the feature). This form has strong assembly and it is installed in the GAC. However looks like the form look the assembly in the folder of the features how Can I make teh form to look the assembly in the GAC??

I use infoPath 2010, VS 2010 and SharePoint 2010.

Thanks for your help!!

 

Could not load file or assembly 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\[FeatureName]_Feature1\Forms\[AssemblyName].dll' or one of its dependencies. The system cannot find the file specified.


Using Infopath form fieldnames in a workflow fails

  

Hi,

I designed a form in Infopath and I published it on a SP2007 server to use in a workflow in a library. That goes fine. In the workflow I send an email message. I can use the fields from my Infopath form in the message that I create. 
If the workfow is starts, Shrepoints sends me the message. But it does not use the fields from my InfoPtah form in the message in stead I see questionmarks.

Why doesn't it show the fields?

I alse saw (maybe this makes it clear) that when I let it dipslay the URL in the message, it show: http://1.portal.lucasonderwijs, but the actual site is whithout the "1" and it should also start with https://

Has anyone seen this before?

Thank you,

Ronald


InfoPath Workflow Task Form "Loading" event handler only being called after App Pool recycled.

  

I have a Workflow that is using an InfoPath task form.  In the "FormEvents_Loading" method event handler I have some code that needs to run each time the form is opened.   I recycle the App Pool and open the form the code runs perfectly, but if I close and try to re-open the form the code is not run at all.  I can then recycle the App Pool again and on the next load the code executes just fine.   The code that is supposed to be run is a very simple statement to set a field value, so I don't think it is interfering.

Does anyone know what this might be?

Thanks,
--Aaron


Problems moving an InfoPath form from a DEV system to QA environment

  

We developed an InfoPath form using a local DEV environment.  The site collection under which the form was developed was http://server1/.

We are now attempting to deploy this form to a TEST environment that uses a slightly different structure for the collection, namely http://server2/sites/sitecol1.

In both cases the site that contains the form is /fin (so we were using http://server1/fin in DEV and want to use http://server2/sites/sitecol1/fin in TEST). 

The form contains VBA code and so requires admin-based deployment via Central Administration, so to deploy to TEST we:

1. Publish the form against the TEST server using InfoPath Designer

2. Upload the form using Central Administration > Application Managment > Manage Form Templates

3. After upload, we activate the form for the site collection http://server2/sites/sitecol1/

4. The form is then associated with a Form Library

When we try to create an instance of the form within this library we get the following error when we click on New to create the form instance:

The following location is not accessible, because it is in a differ

Infopath cannot load this form. Either the signature is corrupted, or the certificatie used to sign

  

Hello:

I have a whole bunch of forms contains errors like whenever you try to open it up.

Infopath cannot load this form.  Either the signature is corrupted, or the certificatie used to sign this form is expired or revoked.

The forms were orginally created with digital signature with it.  But we were in the middle of transition from one company to another company.  The digital signature was no longer valid.  Actually, the certificate should have been expired by now.  I removed all the signatures for all of the forms.  So they can continue using the forms to fill in the information.  The problem right now, is trying to open the old forms with digital signature on it.   Not only the company has changed.  We also moved sharepoint from the old server to the new server.

Any idea to resolve th

Insert image into Infopath form and save to SharePoint as PDF file

  

I have an InfoPath web-enabled form in MOSS 2007, that is integrated with a K2 blackpoint process for an approval workflow.

Once the form (a Purchase Order request form) has been approved in the K2 workflow process, I switch the form view to a "print-friendly" view for the requestor to view from the browser.  However, now I need to go one step further with this scenario:

1) I need to somehow insert/embed an image with the scanned-in signature of the approver (likely stored in a SP doc library) at the signature line section of my form.  Also, what are the security requirements for storing such images, but not granting all users access to these (e.g. only services accounts that need to access this for embedding into the form, etc.)?

2) Then I need to convert this final "print-friendly" view of the form (with the signature image) to a PDF document so that I can store it in SharePoint (and email it to the requestor using K2's email event capabilities).

Can anyone help me with a solution to both of these requirement, or point me to some resources for this (even 3rd party components are open-game).

thanks!


--Thiago
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend