Does anyone knows how to show a custom action in the ribbon for only one list? At this moment I've got multiple custom lists, but my button is added on all of them. I only want to show it on one particular list...

(I found a simular question, but there isn't a good solution for it)

3 Answers 3


You can associate your custom action to a specific list by using the RegistrationId property.


<CustomAction ControlAssembly="MagicalProject.Actions" 
                Description="This is my custom action which does magical stuff" 
                RegistrationId="MyMagicalList" // Or whatever other identifier you have for your lists

UPDATE: It also applies for ContentTypes. So if you associate it with a contenttype, then all lists inheriting that specific contenttype will also get this custom action. In case you wanted to know how to put it on more than 1 list.

All it takes is changing RegistrationType from List to ContentType

  • 1
    I've used as RegistrationId the Id from the list and than it worked perfectly. Thanks! Commented Jan 26, 2012 at 9:50
  • 3
    Wasn't the registration id used to specifiy a list ServerTemplate id? You can associate the custom action to a specific template (es: generic list, document libray, image library ecc), but I don't think you can use the registration id to specify a string name of a list. Commented Jan 26, 2012 at 9:58
  • @SPArchaeologist According to MSDN you can. I think you might be thinking about RegistrationType.
    – user2536
    Commented Jan 26, 2012 at 10:02
  • @Dandroid. From my experience, the registration id is used to specify a list template id (you must also set the parameter RegistrationType to "List"). That way you can for associate your action with every list of a set template - be it Survey (102), GenericList (100), PictureLibrary (109) ecc ecc. I am not aware if you could also use a list name/url/other in place of the template id - I will test this when I get some time, for now this is a nice thing to know (that would open new way to implement things). Commented Jan 26, 2012 at 10:19
  • 1
    @JohnDoDo: One more thing. I'm not sure I fully understood your situation, but if you need to add your custom action to a specific Content Type you may try to change the registration type to ContentType and set the RegistrationID to the id of your CT. Commented Feb 3, 2012 at 8:06

I've made some research on the subject of RegistrationId and RegistrationType according to declarative Ribbon customization. All my findings can be found here:

RegistrationType & RegistrationId in SharePoint 2010 declarative Ribbon customizations

As a short summary: You can use all four registration types to target some content for Ribbon customization.

And concerning your question: There's no direct option to specify single list instance by means of registrationid. But there's a workaround; you can create an unique content type for your specific list and use RegistrationType = ContentType to target it.

Another way you can go is the programmatic Ribbon customization.


You can use EnabledScript parameter in CommandUIHandler, where you can put javascript code and check if specific page/list/view is loaded.


    function isEnable(){
      if(location.href.indexOf('AllItems.aspx') > 0){
        return true;
      return false;
  • 1
    beautiful hack !
    – gdbdable
    Commented Jul 22, 2015 at 8:59
  • downvoted: WRONG answer - it still be in all lists (in disabled state)
    – dbardakov
    Commented Apr 19, 2016 at 20:31
  • Why in all lists? You can easily specify to which list you register the action (see other posts)(sorry, I didn't mention this). But you cannot assign action to specify view of list. So my post gives you solution how to specify on which view/page will be the action visible. Commented Apr 26, 2016 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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