Tuesday, 19 February 2008

Set "Show Subsites" option in Sharepoint Modify Navigation to False

Programatically set the "Show Subsites" checkbox in the Modify navigation section of a sharepoint site to false using the code below

spweb.AllProperties["__IncludeSubSitesInNavigation"] = "False";

Friday, 15 February 2008

Modify the Edit HTML Toolbar in Sharepoint

Modifying the Edit HTML toolbar that appears in Sharepoint Publishing pages is very easy.

In your page layout you could add attributes like AllowFonts="false", AllowImages="false" and so on..here is an example of disabling fonts and html editing

That's it!

Publishing InfoPath Forms connecting to Webservices into Sharepoint

The following applies to attaching a certificate to an infopath form and deploying it to sharepoint. This certificate is necessary because the infopath form that we use connects to an external webservice so "full control" level security must be applied to the form.

Thanks Kieran Toon for the below..:-)

To deploy an Infopath 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.

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.

InfoPath features that are supported in InfoPath Forms Services (http://office.microsoft.com/en-us/infopath/HA102040851033.aspx?pid=CH100211501033)
InfoPath 2007 features that are unavailable in InfoPath Forms Services (http://office.microsoft.com/en-us/infopath/HA102105871033.aspx)