0

I Think I have tried every variation from all of the sources I can find, except for the correct one. I want to add a ribbon button the the List Tools tab on lists. Here is what I am doing:

 <?xml version="1.0" encoding="utf-8"?>

 <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

 <CustomAction

 Id="Ribbon.List.Actions.AddAButton"

 Location="CommandUI.Ribbon"

 RegistrationId="100"

 RegistrationType="List"

 Title="Add a Ribbon Button">

 <CommandUIExtension>

  <CommandUIDefinitions>

    <CommandUIDefinition

      Location="Ribbon.List.Actions.Controls._children">

      <Button Id="Ribbon.List.Actions.NewRibbonButton"

        Command="NewRibbonButtonCommand"

        Sequence="5"

        Image16by16="/_layouts/WPImages/excel.png"

        Image32by32="/_layouts/WPImages/excel.png"

        LabelText="Hello World"

        TemplateAlias="o1" />

    </CommandUIDefinition>

   </CommandUIDefinitions>

   <CommandUIHandlers>

    <CommandUIHandler

      Command="NewRibbonButtonCommand"

      CommandAction="javascript:alert('Hello, world');" />

   </CommandUIHandlers>

   </CommandUIExtension>

   </CustomAction>

   <CustomAction Id="export.ScriptLink.jQuery"

     Location="ScriptLink"

     ScriptSrc="js/exportToExcel.js"

      Sequence="10010">

  </CustomAction>





  </Elements>

I am missing something small I know. I just need a bit of help please. Thanks!!

1 Answer 1

0

I love it when 5 minutes later I figure it out. Make sure for anyone who is also having this problem, check your RegistrationId to be sure it is pointing to the right list. that was my mistake. Here is a link to a list of them.

1
  • And that only you could have figured out, since 100 is also a valid value :) Dec 19, 2014 at 20:49

Your Answer

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

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