Author Archives: Ernst Wolthaus

SharePoint REST JSON results differ with $top

When you have been working with the SharePoint 2010 REST API, you know it’s extremely easy to get the results you want, using jQuery and calling the URL with REST syntax from JavaScript.

Because JSON data is so much easier to use and parse than XML, I almost always use the $.getJSON functionality to get the data I want.
If you use FireFox and FireBug (of course you do!), you probably have taken a look at the data underneath. Something like this (click to enlarge):

Continue reading

New supporting forms by SharePoint Designer not quite the same

When you want create a new ‘supporting’ form (new/edit/display), there’s a special section in de SharePoint Designer 2010 interface that will create such a file for you:

This will create a new shiny form you can to use and customize. This works a whole lot better than the old crappy way with SharePoint Designer 2007 where you had to copy/paste the code from a newform/editform/dispform to your own .aspx file. And it would always break the attachments functionality… Continue reading

Menu items don’t show in global navigation

Hmmm…. this must be one of the most stupidest bugs I have ever seen in SharePoint.

So what’s the deal?
I’ve got a sitecollection in SharePoint 2010 that will eventually contain about 35 subsites. After creating the first 18 subsites, my global navigation showed only the three subsites I wanted the enduser to see. I hid the other 15 subsites.

My global navigation bar looked like this:

After added an additional 10 sites (all hidden from navigation), I suddenly noticed the menu item “Speaker pool” was gone.

Continue reading

Using the My Site and build a social network

I usually don’t blog about other blogposts because it doesn’t add any value, but I’d like to make a exception.
I came across the following article about using the My Site as a business social network. It is basic, but I think makes for a very nice entry point for customers starting out with SharePoint 2010.

SharePoint social – Update your My Site and build a business social network

Filter REST call on SharePoint with DateTime value

As you may know, using the REST API in SharePoint 2010 is a very flexible and powerful way to retrieve data from SharePoint. I love the way I can use the ListData.svc to get data form lists and document libraries. Finding the correct syntax however can sometimes be challenging…

Today, I found myself looking for a way of retrieving items from a calendar list. Getting the calendar items themselves wasn’t a problem, try to filter the items for only the current items (today and greater) was.

After some Googling and several syntax attempts I found out the right way to do it.
Say I only want to  get calendar items that start  on November 23, 2011 or beyond…

http://<servername>/_vti_bin/ListData.svc
/Calendar?$filter=StartTime+ge+datetime'2011-11-23T00:00:00'

Works like a charm…

Update March 27, 2012
Because of the question Michal asked I retested some scenario’s. It turns out you cannot filter on time values. Real bummer 🙁
So:

http://<servername>/_vti_bin/ListData.svc
/Calendar?$filter=StartTime+ge+datetime'2011-11-23T09:00:00'

will filter on dates, greater or equal than 2011-11-23. It will not filter on 09:00, so an event taking place at i.e. 08:00 will be returned in the result set.

Therefore, there is no need to specify the time and you can filter without the time part of the query, like this:

http://<servername>/_vti_bin/ListData.svc
/Calendar?$filter=StartTime+ge+datetime'2011-11-23'

If I’m wrong, please let me know…

 

ULS Viewer stops working

A couple of weeks ago I noticed my ULS Viewer stopped working. It suddenly just stopped reading the logfiles.

Now, because I didn’t have the time to investigate, I resorted to opening the most recent logfile with Notepad++ and try to trace what was happening. It does work (although it’s a ton of text you need to scan for issues) but finally I got fed up working like this and decided to fix the problem.

I tried everything, from different ways to connect to the logfiles to downloading the executable and replacing the old one.

Nothing worked till I saw some vague answer in the Google search results (do you also scan the Google results for answers without opening the pages themselves? :)) about cleaning up the logfile folder.

I quickly removed all the old files (not the current one ’cause that one is locked) and fired up ULS Viewer again. YES, it fixed the problem! Man, did I miss using ULS Viewer…

BTW: if you are working with SharePoint as a developer and don’t know ULS Viewer (I cannot imagine), try it. You’ll love it! http://archive.msdn.microsoft.com/ULSViewer

acc

Data Access with Search and the KeywordQuery API (SPC334)

Great session by Phil Wicklund today about SharePoint Search.

Phil’s session consisted of:

  • Overview of data retrieval with Search
  • Introduction to data retrieval with Search
  • Programming search
  • Topology & capacity considerations

Phil gave a very nice overview of possible ways to aggregate data in SharePoint, accessing data with:

  • SharePoint Object model
  • SPQuery
  • Linq to SharePoint
  • Webservices

Continue reading

Business documents using Word Automation Services and Open XML (SPC349)

Having already seen some of the great sessions Scot Hillier gave in the past, I decided to attend his session on Open XML and Word Automation.

Scot gave us a very interesting look inside a project he did for a company, generating all kinds of documents from several data sources. Generating documents like resumes, company pitches and bid documents, etc.

Scot demonstrated how to create documents from a external database using BCS to get to the data. Using content controls (in MS Word) and Open XML. Continue reading

Developing and getting the most of sandboxed solutions (SPC336)

Mike Ammerlaan held a really great session yesterday about developing sandboxed solutions.

After some initial slides about possible techniques for developing sandboxed solutions, Mike showed a really great looking sandboxed solution for support tickets. And more awesome: it was Metro-styled! Continue reading