Sharepoint 2010 - Ribbon button does not show up

How will you troubleshoot if your Ribbon button does not show up. Well here are some tips to start with.

There are infact a couple of places to start looking to troubleshoot your issues.

First, fire up your JavaScript debugger and set a breakpoint. Since the Ribbon is implemented in JavaScript, you can set breakpoints in the code in SP.Ribbon.debug.js . Also, make sure to look at the XML in cmdui.xml to see if there is a pattern your code resembles so you can model your code on that pattern.
The second thing to check is that the sequence is set correctly and does not collide with other
controls. SharePoint uses sequences in multiples of 10 or 100, so make sure that you are not using those multiples.

Make sure to check that the name for your function is the same for your command attribute on
your control defi nition and your CommandUIHandler . If you get the name wrong, even with the same spelling but different cases, your commands will not fire.

Check the registration for your CustomAction . Did you register your UI on a document library?
When you test your code, are you in a document library? Or did you register on an edit form for
announcements? This ties in with the next tip, which applies when you are wondering why your
user interface does not appear if you select your list instance as a web part in another page. For example, suppose that you are on your home page and you added in your Shared Documents library as a web part on that page. When you select the document library as the web part, your button does not appear on the menu. The culprit behind this is the toolbar type property for the web part under web part properties. By default, it is set to summary toolbar and you want it to be set to full toolbar,since the summary toolbar will not load any of the customizations for the toolbar.

0 comments:

Post a Comment

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com