Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We are building an ASP.NET MVC UI to sit on top of SharePoint 2010.

One of the questions that has cropped up is how difficult/easy it will be to re-create buttons to do standard SharePoint 2010 things.

For example, we will create an MVC view of a document library. In SharePoint 2010, a document library has a Connect to Outlook ribbon button. We want the same function available when looking at a document library in our MVC UI.

I've found this but it's re-implementing the function.

I was hoping to find something like this:

// Massively simplified namespace but you get the idea!
SharePointApi.ConnectToOutlook(list, ...);

I understand the ribbon is context aware, but when you're looking at a document library all it really knows that is relevant to hooking up to Outlook is which document library it is. So when you click the button, something like the above has to be called. How can I find out what that is for any given standard ribbon function and start hooking into these functions easily?

I don't mean by reading front to back books about working with SharePoint and/or SharePoint & Outlook. Is there a reference someone knows of, or a programmatic investigative way to find out what a given ribbon action actually calls behind the scenes? (e.g. reflection... somewhere)

I'm not sure I've explained myself too well, so please comment if this doesn't make sense.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I have recently done some extensive ribbon customizations. I found out that replicating default ribbon commands can be very tricky and in most cases it simply cannot be done. So I decided to "reinvent the wheel" and ended in writing custom code for number of default ribbon commands.

Ribbon is tied to current context and that is only one part of the problem. Majority of default ribbon commands is buried in obscured javascript functions and answering to 'what is really going on when user clicks ribbbon' is at least time consuming. Reflection can be helpful for finding some of the basic functions but it is pretty limited since most logic is in client side scripts.

Ribbon is one of the most complicated things in SharePoint and one of many areas where good documentation is missing.

I would really love to know if you make any progress and what direction did you take.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.