Sample code for a Sandboxed Solution for Office 365 using search.asmx with jQuery

By | 2011-05-06

Wanted to create a sample that:

  • Runs on SharePoint 2010
  • Uses the Search.asmx webservice
  • Can run inside the sandbox
  • Uses jQuery
  • Can run on Office 365

What to create? A webpart that shows all site collections you have access to!

Here is the output of the webpart actually running on Office 365:

o365-code-search

The webpart itself is quite simple:

Using the search.asmx with jquery is not that hard:

There is a gotcha: not all managed properties avaiable in a OnPremise default SharePoint 2010 installation are available in office 365. So I had to do some extra filtering in the javascript code (managed property webid should have a value).

The code is available here: 0365-sample-v14-jquery-search.WebParts

The Sandboxed Solution here: 0365-sample-v14-jquery-search.WebParts.wsp.zip

Leave a Reply

Your email address will not be published. Required fields are marked *