Monthly Archives: January 2013

SharePoint Developement

Change the default scope of SharePoint calendar view to week

Actually using object model we can’t set the default scope of Calendar view. Let’s see how the SharePoint UI do it and then try to replicate the same in our solution. When you change default scope of calendar view through UI, SharePoint sends RPC request to _vti_bin/owssvr.dll.  To see what RPC request SP sends, let’s modify the default scope through sharepoint UI and check the […]

SharePoint Developement

InvalidQueryExpressionException – the query expression is not supported

The best way to retrieve results from sharepoint list in terms of performance using client object model is to use ‘include’  with lambda expression. using (var context = newClientContext(http://server/site/sitecollection)) {  List currentList = context.Site.RootWeb.Lists.GetByTitle(“MyList”);  CamlQuery camlQuery = newCamlQuery(); camlQuery.ViewXml =“[YourViewXmlhere]”;  ListItemCollection collListItem = currentList.GetItems(camlQuery); context.Load(collListItem, items => items.Include(item => item[“ID”], item => item[“SomeField1”], item => item[“SomeField2”])); […]