SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to add button to a custom list. It seems impossible to me, below is my button definition from elements.xml

<CustomAction Id="CopyTasksButton2" Location="CommandUI.Ribbon"
            RegistrationType="List" RegistrationId="10028">
      <Button Id="Ribbon.ListItem.New.Controls.ReplacementButton"
        Image32by32="/_layouts/1045/images/formatmap32x32.png" Image32by32Top="-320" Image32by32Left="-384"
        Image16by16="/_layouts/1045/images/formatmap16x16.png" Image16by16Top="-160" Image16by16Left="-192"
        LabelText="Replaced Button"
        TemplateAlias="o2" />
      CommandAction="javascript:alert('This button has been replaced.');" />

I got this code from some tutorial. Here's link text a similiar post describing the same problem. I tried changing tollbar mode in list definition from Standard to Regular, but the button still don't show up. Anyone knows how to solve it ?

EDIT: Even more strange thing: it works fine on another custom list (I only changed RegistrationId). The only difference between them is the fact, that the list on which it's working fine was created programatically during deployment.

share|improve this question
Looks fine to me - I suspect from your edit that the RegistrationId is likely the problem. Did you change the RegistrationId between when you manually and programmatically creating the two lists? – Andy Burns Dec 27 '10 at 11:17
I'm sure it's fine, I know the answer and I'll post it in a sec. – user2052 Dec 29 '10 at 11:24
up vote 0 down vote accepted

The problem was the fact, that the feature adding custom actions file was not activated on the site I had my list on.

share|improve this answer

Your Answer


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