Tuesday, August 19, 2008

Sharepoint Error Viewing Site Content and Structure Reports

Another weird Sharepoint error.  Suddenly our MOSS site started throwing errors when viewing reports in the "Site Content and Structure" screens. 

 

The default "All Documents" report was fine, but others such as "Checked out to Me" gave this helpful error:

 

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))   at Microsoft.SharePoint.Library.SPRequestInternalClass.ReleaseResources()
   at Microsoft.SharePoint.Library.SPRequest.ReleaseResources()

 

Simply adding "<Lists ServerTemplate="850"/>" into the CAML list type for the report got everything up and running again

 

I've no idea what caused it but many thanks to this forum post for the cure!

Programmatically adding items to Sharepoint Choice Field

This has just caused me a bit of hassle, and it wasn't very easy to find a solution.  Sharepoint seems to store choice columns in this format:

 

";#Choice 1;#Choice 2;#"

 

The one thing that is crucial to remember is that the list has to start and end with ";#".

 

I missed out the last "#" and it failed to recognise the list.