2010-09-29

SharePoint 2010, REST API, JSON, Javascript , JQuery AND correct Date handling/serialization

Today I created a Javascript that displayed the calendar events from a SharePoint calendar. I used Javascript and SharePoint's REST API to inject the result in a cusom Spot web part that I've written. Combining the REST API and JQuery was straightforwad, but I ran into trouble when I was going to display the calendar event's start date.

It turns out that JQuery date serialization and WCF date serialization differs. Luckily (for me) I found the description of the issue and a solution written by Steve Commisso. Read it here.

Key elements in the JavaScript:

SharePoint 2010 Certifaction Run Started!

Then I've started my SharePoint 2010 certifaction run. I'm planning to complete all 4 by the end of the year.
  • 70-573 TS: Microsoft SharePoint 2010, Application Development. Sept. 2010. Passed!
  • 70-667 TS: Microsoft SharePoint 2010, Configuring. Okt 2010. Passed!
  • 70-668 PRO: SharePoint 2010, Administrator. Nov 2010. Passed!
  • 70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications. Des 2010. Passed!

2010-09-22

Using, embedding and deploying resources (gif, css, javascripts, etc) when writing SharePoint 2010 web parts

I came across an article by Maurice Prather, "Web Part Class Resources - a forgotten storage location", and I also failed to answer his question; What are Web Part resources? I've never thought about this way of deploying resources used by and in my web parts. I've more or less always used the "classical" way of deploying my images, css, js, etc to the /layouts/mydirectory. That may change in the future!

But here is also anohter option, and that is to deploy the resources as WebResource. I'm not 100 % sure that I can answer you when to use what method, but i gues WebResources should be used in non-webparts scenarios, and/or SharePoint solutions where the same resource is to be used by different sharepoint items (Web parts, Application Pages, etc).

On CodeProject you'll find a working example where both methods have been used: Site Map Web Part.

2010-09-21

SharePoint Roadmap for Collaboration Masterclass with Michael Sampson

On October 6. 2010 Michael Sampson will visit Bergen, Norway, and hold his SharePoint Collaboration MasterClass. It is a one-day seminar open to everyone. It will be heldein our (EDB Consulting Group) office on Bryggen.

More information here (in Norwegian): http://www.edb.com/no/Konsern/Aktuelt/Eventkalender/SharePoint-Roadmap-for-Collaboration-Masterclass/

2010-09-15

Are you going to use PowerPivot in your SharePoint 2010 farm?

Then make sure that you meet the following SQL Server 2008 R2 requirment that will have a great impact on your SQL Server license cost:

"You must have installation media for the Enterprise, Evaluation, Developer, or Data Center editions of SQL Server 2008 R2. "

That means that PowerPivot on top of SQL Server 2008 R2 Standard Edition is NOT possible.

Install PowerPivot in a new farm

Install PowerPivot on an existing farm

Other comments:
  • PowerPivot for SharePoint adds SQL Server 2008 R2 Enterprise files to your SharePoint application Server

2010-09-14

Configuring the People Picker in a trusted domain scenario and Sharepoint Foundation 2010

If you get an Access Denied message when trying to run the stsadm commands such as setpassword and setproperty then open the command prompt windows as an Administrator, and try again.

Setting the correct search scope for the people picker:
  1. stsadm -o setapppassword -password xxxxxx
  2. stsadm -o setproperty -pn peoplepickser-searchadforests -pv "domain:first.com;domain:second.com,domain\user,password" -url http://sharepoint2010/

First.com domain trusts users from second.com. For the people picker to find users in the second.com domain a valid user in second.com domain has to be provided. Because we provide a user name and password we first have to set the password encryption key.

Error when deploying SharePoint 2010 web parts in an upgraded Visual Studio solution

I had a Visual Studio 2008 web part solution that I upgraded to a Visual Studio 2010 solution. It looked like everything was going to be ok, but I got the following error in the ULS when trying to add the web parts to a page:

09/09/2010 14:08:36.82 w3wp.exe (0x269C) 0x1998 SharePoint Foundation Web Parts tkqj High WebPartAdder_InvalidDwpUrl

Checking the solution again the web parts where added as modules and not web parts to the solution.

I ended up deleting the web parts (except the source code of course), adding new web part items, and adding the deleted code. Now it is working as it should

Web parts dissapears from a wiki page or a content field when added

I think there is a bug here. Several times I've experienced that my custom (and standard) web parts just dissapears when inserted in a wiki page or a content field on a publishing page. SharePoint thinks it is visible - append ?contents=1 to the Url - but no it is NOT there.

Create a regular web part page, add your web part and you should be up and running (again).