External lists - where is my "Connect to outlook" button?
I've said it before and I'll say it again - External Lists in SharePoint 2010 are just awesome. Today I was looking at some work I am doing with an Outlook add in that ties in to an External List in SharePoint and I came across a bit of an odd situation - when I went to browse to my external list the "connect to outlook" button was missing from the ribbon! It wasn't disabled or anything like that, it was just plain and simple not there! Luckily though, this was an easy fix and I wanted to quickly share the solution.
As with everything to do with the Ribbon in SharePoint, it is all to do with features. Now the external list I was working with was deployed to a site that I had created from a custom site template that I had based on the blank site, so not a lot of features turned on in it at all (I like to keep these things very minimal and turn on only the features that I genuinely need when I'm writing up the onet.xml file). With that in mind I set out to find the feature that would add my button back, and a minute or so later I found it. The feature in question is a site scoped feature (not site collection - so "Web" scoped for the developers out there) and it's called "Offline Synchronization for External Lists".
So the easy way to fix things here is to just manually turn it on and all is well - but since I'm working with a site template I wanted it included in the site template, so I just looked up the ID of the feature (for anyone who doesn't know, you can do this very easily by switching on your developer tooling of choice and having a look at the HTML around the activate or deactivate button - SharePoint will render a div tag that has an ID attribute of a GUID, this is the ID of that specific feature) and then put it into my onet.xml file, the XML looking like this:
<WebFeatures>
<!-- Offline Synchronization for External Lists -->
<Feature ID="d250636f-0a26-4019-8425-a5232d592c01" />
</WebFeatures>
A quick redeployment later and my ribbon button was there and all was right with the world once more!
Comments
No comments yet. Be the first!