SharePoint 2010 CAML List Joins

SharePoint 2010, you can finally do List Joins in CAML.  This would be a great boon to the type of views that you can create in SharePoint and in code.

http://msdn.microsoft.com/en-us/library/ee539975(office.14).aspx

There is a catch – it looks like the field that you can use for joins must be a Lookup type field to the foreign list.

Join type can be LEFT or INNER.

Given that LINQ to SharePoint sits on top of CAML – all the LINQ join statements will translate properly as well.

 

 

When I first started developing with SharePoint, I really hated CAML. 

In time, I’ve learnt to live with CAML, the lack of good tools drives me crazy.  But it is a necessary evil when you work in SharePoint.

Apple iPhone drivers are pos

Exhibit A: Windows Explorer looking at the pictures in my iPhone.

Exhibit A: Windows Explorer looking at the pictures in my iPhone. 

 

Notice that almost ALL of them are upside down, this happens very often when I take pictures sideways.  At a glance – you probably think (and I as well) ah you must have held your camera upside down.

But stop for a second.  When I view the pictures in iPhone, it always know which way is UP.  Imagine if you were trying to look at your pictures in your iPhone and they were upside down…  You’d try to flip the phone… but then iPhone will flip the pictures upside down again!  The whole Pictures library will be unusable.  People would get upset!

That means the iPhone knows intrinsically which way is UP, for each picture.

So WTF is it doing when it shows the picture through their drivers on Windows Explorer?

My educated guess and conclusion really is just this:

Apple don’t care if you use an application that’s outside of their ecosystem.  They simply don’t care if you have the absolutely shittiest experience.  Why, it must be Windows’ fault if it can’t render pictures correctly… 

I hate this arrogant side of Apple.  Pisses me off when their engineers can do such a great piece of art and yet at the same time piss on other engineers’ work.

SharePoint 2010 beta TaxonomyPicker in EventLog

Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type 'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker' from assembly 'Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.

 

The TaxonomyPicker user control shipped in the beta version of SharePoint 2010 is invalid.  Open it up and change fix the Type,Assembly reference to a comma. 
(Note) You’ll need administrator rights to save to this folder.

 

<%@ Control className="TaxonomyPickerControl" Language="C#" Inherits="Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker&#44;Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Change the '&#44;' to comma (,)

SharePoint: referencing SCRIPT done right

Our scenario is pretty simple – we have a package that includes some JavaScript files.  We had them deployed to /Style Library/ similar to our CSS resources.

We then refer to them in our page layouts and master page via

<script src=”/Style Library/project/myscript.js” />

It works fine on dev.

Problems!

This makes no assumption about the web application or site collections of the destination server.  When the site was exported and imported into various different site collection configurations, things start to go silly with 404 script file not found.

Site collection: http://mysharepoint.com/sites/mysite/
The JavaScript then is at: http://mysharepoint.com/sites/mysite/Style Library/project/myscript.js
But the reference is still looking for http://mysharepoint.com/Style Library/project/myscript.js
Oops – 404 error.

Fix!

The solution comes in a two steps:

  1. Deploy to _layouts/ instead, so the script resource is at
    http://mysharepoint.com/sites/mysite/_layouts/project/myscript.js
  2. Use the SharePoint control ScriptLink
    <SharePointWebControls:ScriptLink Name=”/project/myscript.js” Localizable=”false” runat=”Server” />
  3. The localizable = false is important – otherwise SharePoint will look for
    http://mysharepoint.com/sites/mysite/_layouts/~language/project/myscript.js

SharePoint 2010 missing Alert Me

Was at UTS teaching SharePoint when an interesting problem striked. The students couldn't see Alert Me on their ribbon bar.

My initial thought was that the ribbon was too cramped and the bell icon must be obscured. But after brief experimentation it was clear that the ribbon bar is pretty advanced and immune to that sort of defect. It must be somehing else.

Turned out that the issue was actually that the SharePoint standalone installation on their image did not have an out going mail server configured, so SharePoint correctly assumed that the user won't be sending out any emails. And thus, hid all the mail related functions.

What was surprising was tha I had assumed inSharePoint 2010 if an option wasn't available it was supposed to grey out, instead of just disappearing. A disabled alert me button with an warning message that "this SharePoint farm is unable to send Outgoing Emails" would have been fantastic