Tuesday, October 28, 2008

Working with SharePoint web services - GetList and GetListAndView

Working with SharePoint web services is a challenge. Especially as it is not as well documented as you could have expected. So I often end up spending lots of time with small details which is mainly due to bad design. Let me give an example. Consider the GetList web service outlined below:

The web service contain one parameter:
Whenever I use this web-service I always forget the it doesn't mean the name of the list, but the title of the list. Such a minor detail leads to waste of time - lot of time. And I'm probably not alone out here.

If you use the listName rather than listTitle you get the brilliant error message:
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Does anyone know how to retrieve information about a list from it's listName rather than listTitle? As end users can rename lists easily the URL for the list is probably better to use than the name.

Sunday, October 26, 2008

The security validation for this page is invalid

Wonder how to avoid the "The security validation for this page is invalid" error when using the SharePoint API. At least I do.

Fortunately I came across this blog yesterday. Not sure it solves all my problems - but I tried it out and some of the exceptions disappeared. I'll make more research.

Saturday, October 04, 2008

Copying documents between doclibs - including metadata and versions

Moving or copying documents from one area in SharePoint to another is, unfortunately, not as easy as copying documents between folders in Windows Explorer.

Basically - you'll need to write a program to do so.

Luckily this blog descibres how.