06 July 2010

Developing Applications for SharePoint 2010

Good development information for SharePoint 2010 and attached download with documentation and samples:

http://blogs.msdn.com/b/sharepoint/archive/2010/06/30/developing-applications-for-sharepoint-2010.aspx

download this (link at the bottom of the article):
http://www.microsoft.com/downloads/details.aspx?FamilyID=64b55569-2168-4545-8b7c-f185b2cf967d

Querying list data in SharePoint 2010

One of the big changes on the development side in SharePoint (Foundation) 2010 is how list data can be retrieved.

Client side (or external server)
Two new methods:
- ADO.NET Data Services, using REST web services (http://msdn.microsoft.com/en-us/library/ee535480.aspx)
- Client side object model (for data retrieval samples, see: http://msdn.microsoft.com/en-us/library/ee539350.aspx)

Still supported for backward compatibility:
- Web Services, e.g. the Lists web service
- RPC calls using the owssvr.dll assembly

Server side
New method:
- LINQ to SharePoint Provider (examples: http://msdn.microsoft.com/en-us/library/ee538250.aspx)

Already available method:
- Server object model (SPQuery and CAML)

17 February 2010

Setting Default Document Name in Word (2003)

To automatically set a default document name when saving a file to SharePoint, put the below code in your document template:

Private Sub Document_New()
Dim strTitle
strTitle = "My New Document - " & CStr(Month(Now()) & Day(Now()) & Year(Now()))
With Dialogs(wdDialogFileSummaryInfo)
.Title = strTitle
.Execute
End With
End Sub

16 February 2010

Excel 2007: Synchronizing Tables with SharePoint Lists

For some reason Microsoft deprecated the functionality to synchronize Excel 2007 with SharePoint lists. Various posts have been written about this and Microsoft even published an Add-In to restore some of this functionality (however, it doesn’t provide the full sync features as in Excel 2003). The solution that works best is a third party IE ActiveX control that intercepts the “Export to Spreadsheet” and returns the full sync functionality back to Excel 2007: http://www.softfluent.com/wsslists.htm

Here are some of the related posts:
http://www.shahine.com/omar/Excel2007CannotTwoWaySyncToSharepoint.aspx
http://support.microsoft.com/kb/930006 (provides VBA code to mimic the functionality)

Microsoft Add-In
http://blogs.msdn.com/sharepoint/archive/2007/06/21/excel-2007-add-in-for-synchronizing-tables-with-sharepoint-lists-now-available.aspx
http://msdn.microsoft.com/en-us/library/bb462636(office.11).aspx
http://www.microsoft.com/downloads/details.aspx?familyid=25836e52-1892-4e17-ac08-5df13cfc5295&displaylang=en (Add-In download)

09 March 2009

Taxonomy

one area where SharePoint is not living up to its expectations is document taxonomy. more complicated tree like structures cannot easily be accommodated in SharePoint. although Content Types are great and metadata can be applied as desired, there is no easy way to manage content in multi-level hierarchical structures.

one possible solution is provided by a third party product, Taxonomy Extension:
http://www.sharepartxxl.com/products/taxonomy/default.aspx. this solution allows you to set up a tree structure for tagging and easily apply these tags as metadata to documents. it will also create a category navigation site that allows you to browse links to all tagged documents based on the tree structure. this makes it really easy to navigate your way through the tree even though the actual documents are stored in libraries that do not necessarily match the tree structure.

one problem (as with all custom field types): the tagging doesn't work from within Office applications... maybe a custom document information panel is the solution here?

24 November 2008

STSADM custom commands

Gary Lapointe has published custom stsadm extension with some very useful migration commands (among many others): http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html

21 November 2008

Some part of your SQL statement is nested too deeply...

I ran into this error after testing a 'on change' workflow that was itself updating the item it was running on (which of course creates a loop):

"Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries."

turns out that this is caused by a bug in SharePoint in combination with too many items returned in a CAML query from the workflow history list.

this post explains it nicely: http://blogs.blackmarble.co.uk/blogs/rhepworth/archive/2008/07/03/workflow-history-and-sql-error.aspx

28 October 2008

connect RSS Viewer web part

you would expect that connecting the RSS Viewer web part to a filter web part is very straightforward. however, when you simply add both web parts to a page, set up the RSS Viewer web part connection to "Get Feed Parameter from" the query string filter web part, it doesn't work...

what you need to do is simply have the RSS feed URL to be without parameters and to change the Filter name value on the query string filter web part to match the expected parameter name on the RSS feed URL.

see for more details my post in this thread: http://social.technet.microsoft.com/Forums/en-US/sharepointsocialcomputing/thread/588ff314-d4e6-4ea2-857b-f50c4c7deed9

19 May 2008

Alert and history display incorrect time

Different people are reporting problems with incorrect times displayed in SharePoint Alerts which seem to be related to the time zone offset that is not correctly applied to the times displayed in the alert emails. I have also noticed the same problem in the calendar event history where the event times displayed in the history are not correct either (i.e. are displaying UTC time).

There is a thread on TechNet related to this: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3236200&SiteID=17 and Paul Liebrand has posted about it and created a utility to gather the time zone settings on your server: http://liebrand.wordpress.com/2008/05/19/does-your-sharepoint-alerts-have-wrong-time/

05 May 2008

Microsoft SharePoint Administration Toolkit

Microsoft has released an Admin Toolkit for SharePoint which will allow you to move site collections between content databases. This will be useful to better manage the size of databases that have grown really large due to a specific site collection. The MSDN blog post can be found here: http://blogs.msdn.com/sharepoint/archive/2008/04/30/announcing-the-first-release-of-the-microsoft-sharepoint-administration-toolkit.aspx

Unfortunately they didn't add functionality to move a site to a different site collection or to another site...

22 April 2008

Faceted Search

Leonid Lyublinski from Microsoft has published a powerful extension to MOSS search that allows you to drill down into the search results using indexed metadata: http://www.codeplex.com/FacetedSearch

Here is the MSDN blog post: http://blogs.msdn.com/sharepoint/archive/2008/01/30/open-source-faceted-search-for-moss-2007-and-microsoft-search-server-2008-part-1-of-2.aspx and WSSDemo has implemented it on their site: http://www.wssdemo.com/Search/Pages/results.aspx?k=search

07 April 2008

Error: 'length' is null or not an object

After a long wait and many frustrated users Microsoft finally released a hotfix for the "Error: 'length' is null or not an object" that occurred in certain environments when using multiple Content Types in combination with Office 2003.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;950292

07 February 2008

Standardize Data Management with Custom Content Types

http://www.microsoft.com/technet/technetmag/issues/2008/02/ContentTypes/default.aspx
"SharePoint 2007 makes it possible to standardize many aspects of content and lifecycle characteristics through content types. Site content types are metadata definitions that can be established independently of any specific site collection, site, list, or document library. This enables you to establish companywide properties, workflows, information management policies, and other elements consistently while also allowing individual departments or site owners to customize content types for specific purposes."

28 January 2008

SharePoint colour calendar

To add colour to your calendars, check out the post from Mark Wilson:
http://planetwilson.blogspot.com/2007/09/sharepoint-2007-colour-color-calendar.html for the manual version using javascript and this page http://planetwilson.blogspot.com/2007/11/updated-colour-color-calendar-for.html for this V2 using a custom SharePoint solution

Re-ordering All-day Items in a Calendar

Nick Grattan has a nice post about how to change the order of items in the Calendar view: http://nickgrattan.wordpress.com/2008/01/23/re-ordering-all-day-items-in-a-calendar/

Another option might be to adjust the schema.xml for the feature (e.g. the EventsList schema.xml in \12\TEMPLATE\FEATURES\EventsList\Events\)

24 September 2007

Folders and Metadata

Andreas Strothmann has an excellent post about using metadata on folders in SharePoint 2007, in combination with content types.

I know there are many good reasons not to use folders and stick to metadata and views, but large libraries might require the use of folders for performance or manageability reasons. It is always recommended to use metadata on your documents in the first place, but using this tip you can also apply this metadata on a folder.

Check it out: http://www.mindbusiness.de/blog/2007/05/02/sharepoint-folders-and-metadata/

17 September 2007

BDC Definition Editor

Microsoft has released a tool to assist in the creation of a BDC (Business Data Catalog) definition file. More information can be found here: http://msdn2.microsoft.com/en-us/library/bb736296.aspx

The BDC Definition Editor is also available in the latest SharePoint 2007 SDK: http://msdn2.microsoft.com/en-us/library/ms550992.aspx

06 September 2007

Hiding Site and List Templates

There may be occasions where you want to disable certain site templates or list templates to prevent site administrators to create specific lists or sites.

The mechanism for hiding a Site template in SharePoint 2007 is still the same as in 2003:
  • Look for the file webtemp.xml in "web server extensions\12\TEMPLATE\1033\XML"
  • Make a backup copy of this file first
  • Open the file in notepad and look for the site template you want to hide
  • Change Hidden="FALSE" into Hidden="TRUE" (case sensitive) and save the file
  • Do an IISRESET

This will hide the specific site template from the list of templates available when you create a site.

Hiding a List template in SharePoint 2007 works slightly different due to the new Features concept but is equally simple:

  • First find the template/feature you want to modify in "web server extensions\12\TEMPLATE\FEATURES"

If you want to be able to show or hide the list through the Site Features option in a site, do the following:

  • Make a backup copy of feature.xml
  • Open the xml file in notepad and change Hidden="TRUE" into Hidden="FALSE" (case sensitive) and save the file
  • Do an IISRESET

If you want to hide the list alltogether, do the following:

  • Open the subfolder ListTemplates
  • Make a backup copy of the .xml file
  • Open the xml file in notepad and add this line somewhere around the Type or BaseType line: Hidden="TRUE" (case sensitive)
  • Do an IISRESET

30 July 2007

SharePoint Capacity and Performance Planning

Joel Oleson last year posted an article on capacity and performance planning guidelines for both SharePoint 2003 and 2007, a very useful reference for the most important capacity metrics.

And on TechNet you can find a chapter all about performance and capacity planning for SharePoint 2007 providing a lot of detail on this subject.

25 July 2007

Add link to People Search for Author name in search results

The SharePoint 2007 Search results return the name of the Author of each document in the results, but this name is not clickable and thus you can not easily drill down to the Author.


You can change the XSL for the Search results and link the name of the author to the People Search of SharePoint. Follow these steps:

  1. Go to your SharePoint search results page (results.aspx) and click Site Actions, Edit Page
  2. Click Edit next to the Search Core Results web part and select Modify Shared Web Part
  3. In the toolpane on the right click the XSL Editor button
  4. Select all XSL code from the pop-up window and replace with the code that can be found here...
  5. Click Save and OK
  6. Click Publish on the editing toolbar at the top

Now all author names should link to the Search page!