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

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">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition
      Location="Ribbon.ListItem.New.Controls._children">
      <Button Id="Ribbon.ListItem.New.Controls.ReplacementButton"
        Command="ReplacementButtonCommand"
        Sequence="25"
        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" />
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
      Command="ReplacementButtonCommand"
      CommandAction="javascript:alert('This button has been replaced.');" />
  </CommandUIHandlers>
</CommandUIExtension>

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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