More Help with InfoPath 2010

First, we’ll get some help here with turning on the services so the services are all working:

sensoft2000-sharepoint.blogspot.com: Error: The form cannot be rendered…

And, this, from MSDN, shows us how to embed code in forms that can run in a server’s local sandbox: InfoPath 2010 and Visual Studio

But what we really need is to figure out how to get our form projects created in Visual Studio.

So, if we’re starting from scratch, this gem from MSDN is a prerequisite:

Building SharePoint Applications with InfoPath 2010 (Part 1 of 2)

Here we learn a thing or two. First we’re not going to get very far telling our customers to figure it out themselves using Word or Access; InfoPath is the only solution that support moderate complexity and custom, C# code.

Note also, that our options are to develop bullet-proof “administratively deployed forms in SharePoint’s InfoPath form server. This, of course requires access to Central Admin. And if your customer is a SharePoint consumer, that may involve interaction with an IT department that’s less accommodating that one might expect. Alas, InfoPath will allow us to install local forms with custom code. This video, from MSDN, explains that these local form solutions will  run in a server’s local sandbox: InfoPath 2010 and Visual Studio. We can also see that the sandbox draws the line at access to the client files and settings. So really, these “local-custom” form will probably suffice in many situations without having to poke the IT hornets’ nest.

So here’s a great “Hello World” starter from MSDN: Using the InfoPath 2010 Object Model and Visual Studio Tools for Applications

Here, we learn, if you want to embed your code in your form and install it into a site library, you’ll have to use MS Visual Studio Tools for Applications. This is an Office Setup operation. You’ll have to have your Office install bit and may need your product key. Include the .Net Programmability option and it takes the rest of the day!

When you run the install, you’ll get to a point where you get to select the components you need to install. The InfoPath component will have an expansion “+” icon and you can blow it up until you get to where you can select to have MS VS for Applications “Run from my computer.”

Also, be sure your target SharePoint site is in a site collection where the SharePoint Server Enterprise Site Collection features” have been activated. This is different from the top level site collection’s site features and you can find it at: /_layouts/ManageFeatures.aspx?Scope=Site

And here’s a great detailed listing for control that will and won’t work in browser forms: InfoPath 2010 features unavailable in Web browser forms

So we can get to VST for Application on the second part of MSDN’s Building SharePoint Applications with InfoPath 2010 (Part 2 of 2) which seems to be very well written and provides a great glimpse at the need for the SharePoint Sandboxed Solutions Service.

 

 

 


Tags:

 
 
 

Comments are closed.