문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top