SharePoint

SharePoint Konferenz 2009

Die SharePoint Konferenz 2009 findet am 11. und 12. Februar in München statt.

Auf der Konferenz werde ich einen Vortrag “Best Practices in der Webpart-Entwicklung” halten.

Voraussichtlich werde ich die folgenden Themen behandeln:

· Fallen umgehen und Probleme vermeiden

· Logging in das SharePoint Log

· Webparts mit eigenen ToolParts

· Nutzung “ToHtml” Funktionen

· Berechtigungsprüfung

· Code Ausführung mit erweiterten Berechtigungen

· SharePoint Webcontrols

· SPContext – wo bin ich

Announcing SPDisposeCheck tool for SharePoint Developers

Webpart to show Sitecollections/Subwebs

This Webpart will show Sitecollections from the current Webapplication or Subwebs from the current web.

In the Webpart properties you can choose what the Webpart will show.

It uses the Logo URL of websites, if they are specified. The description of the website will show up as tooltip.

I am using the RepeatedControls class to build the items. This class really makes it easy to add entries by moving the layout functionality into an own class.

How-To create a JavaScript tooltip / popup

If you want to create a tooltip to show additional information, you can use the SharePoint functionality to do so. E.g. on a list of websites you could show the website’s description, if the user moves the mouse over the element.

The JavaScript which will show the “Open Menu” text is “MMU_PopMenuIfShowing(this);”. It is referenced on all SharePoint sites through the call to Init.js in the header.

Update packages for the 2007 Microsoft Office and Servers

Microsoft has released many updates for Office 2007.

SharePoint relevant updates:

SharePoint Bug with MultiValue Fields

imageImagine you have a list (or document library) which has lots of items. Nothing fancy here. Now add a lookup or user field and allow it to contain multiple values.

Inside a view for this list you can filter e.g. for the title column. The filter dropdown shows all possible values for the column. image

 

 

 

 

 

Here comes the clue. If the item count of the list reaches a number somewhere between 400 and 500 items, the filter dropdown changes. You will get an option to show all filter values. This is for performance reasons.

Configuration Wizard fails

After you install a hotfix or update for SharePoint, you have to run the SharePoint Configuration Wizard. Sometimes it is aborting with an error. You will get a link to a log file. This is something like “PSCDiagnostics_10_17_2008_16_53_57_799_923424762.log”.

In my case I got a timeout error:

———————————————————-

10/17/2008 16:55:59  1  ERR              Fehler beim Initialisieren des Updates der SharePoint-Produkte und -Technologien.
Eine Ausnahme vom Typ ‘System.ServiceProcess.TimeoutException’ wurde ausgelöst. Weitere Ausnahmeinformationen: Der Vorgang wurde nicht abgeschlossen, da der Timeout abgelaufen ist.
System.ServiceProcess.TimeoutException: Der Vorgang wurde nicht abgeschlossen, da der Timeout abgelaufen ist.
   bei System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
   bei Microsoft.SharePoint.PostSetupConfiguration.ServiceHelper.Stop(String serviceName)
   bei Microsoft.SharePoint.PostSetupConfiguration.InitializeTask.StopServicesListedInRegistry(RegistryHelper registry)
   bei Microsoft.SharePoint.PostSetupConfiguration.InitializeTask.StopAllServices()
   bei Microsoft.SharePoint.PostSetupConfiguration.InitializeTask.PrepareForUpgrade()
   bei Microsoft.SharePoint.PostSetupConfiguration.InitializeTask.Run()
   bei Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Programmatically creating a SPFieldCalculated

As you might already know, you can create new fields with SPFieldCollection.AddFieldAsXml(string schema). The schema contains the formula for the calculated field. There are some points to take care of, before you can add the field:

  1. make sure your referenced fieldnames are the display names and not the internal field names
  2. the formula has to be in the English format

Changing the fieldnames is an easy task. If you read the schema from a field and want to create a new one with the same formula, you will get something like “=if(fieldA,1,2)”.

Announcing August Cumulative Update for Office SharePoint Server 2007 and Windows SharePoint Services 3.0

From now on there will be cumulative updates (formerly know as hotfix) every two months.

The first cumulative update is the August 26 updates for WSS and MOSS. These updates are only recommended, if you are experiencing the described problems. They will be included in the SP2.

Source: Microsoft SharePoint Team Blog

Wiki Webpart 2.0

The next generation Wiki Webpart is there! Sounds good J The (stupid) name remains, but the core has changed.

What is it?

With the Wiki Webpart you can upload images and documents from a Wiki edit page into existing picture/document libraries. After the file has been uploaded, a link will be inserted into the Wiki Content.

This is either a or a tag, depending on the uploaded file.