Is it possible to include .Net code in Infopath browser-enabled forms if you want to use them in Blackpearl?
It's quite easy to develop a workflow based on a codeless Infopath form, but I still cannot figure out how to deploy a form with embedded code, as it has to be approve first by an Sharepoint administrator.
Any idea?
As far as I recall. Having code in the form makes it browser incompatible. So far we haven't found any way around this. This has nothing to do with K2 [blackpearl] but rather more of the limitations of browser enabled InfoPath forms with Forms Server.
If anybody has found any new update which makes this possible, I would really like to hear about it.
Hi,
I don't believe the above is true regarding code-behind and web campatiablilty of InfoPath Forms. The only issue is that administrators have to upload and activate the form through Central Admin on the SharePoint site for the forms to work.
To deploy a form to SharePoint with code behind publish the form to a common network location(the wizard will take care of this - first option on first screen). Have the administrator upload the form using Central Admin and then activate it for your site collection. This form will then appear a content type which you can use as you wish in any document or forms library.
That is correct, forms with .Net enabled code can be deployed as web enabled forms but they need to be deployed through central administration.
http://spsfactory.blogspot.com/2007/01/walkthrough-publishing-administrator.html
http://technet2.microsoft.com/Office/en-us/library/8285b82e-19db-4408-859f-1430830fe0fb1033.mspx?mfr=true
BlackPearl now publishes the InfoPath form but this does not seem to be accomodated. Maybe there could be an option added to the wizard which would deploy the InfoPath form to central administration and performing the other actions needed.
Excellent pointer. From this information, it allowed me to find this excellent article - Creating InfoPath Form Templates That Work With Forms Services (http://msdn2.microsoft.com/en-us/library/aa945450(VS.80).aspx) which contains the following.
After publishing a browser-enabled form template that contains managed code to Microsoft Office Forms Server 2007, to Office SharePoint Server 2007 with InfoPath Forms Services, or to a shared location, the form template must be uploaded and approved by a server administrator before it will be allowed to run.
These other links were also pretty useful in understanding the limitations of Web Enabled InfoPath forms.
Yep
I have developed many forms with embedded .net code, and they perfectly work in a Forms Services environment (the object model is limited compared to the rich client's, but it's fine).
The problem now is about using them with Blackpearl. When I first heard about the release of the MOSS components for K2.net 2003 in Feb. 2007, I felt like I could do everything with my forms, but unfortunately, forms with embedded code were not supported. Then I put my hope in Blackpearl and... second disappointment: nothing is made to include forms that require administrator approval. Or at least nothing easily visible.
Are there already K2 Blackpearl specialists who could just say if it's possible? Even if they don't know yet how to do
...
After hours (even days!) of suffering and pain, I have just found how to use web-enabled Infopath forms with embedded code with K2 Blackpearl workflow.
I may write a real tutorial one day but for the moment, here are the required steps (maybe there's an easier way to achieve the goal, but I havn't found it):
It's friday evening, I've just written this after getting successful, so please don't be rude if you spot errors or approximations in this quick and dirty tutorial
Nevertheless, if you're in trouble with a particular step, do not hesitate to ask for details.
Is all this really necessary? Did the hotfix change any of this.
Using code behind in infopath seems so natural, is it really cross the grain with K2 BP functionality.
Have you tried updating the form?
Just to make a little phrase correction "This file browser is not made to browse URLs , but it works."
The realy things happen is, when you paste URL location of the template you actually browse to temporary location of the IE. So, in fact you upload the file from local directory.
Thanks,
Riwut