none
pwa custom button + action not working RRS feed

  • Question

  • Hi,

    I've added a custom button to pwa. The button is there but when I click on it, it does nothing. I've tried to use a built in command instead of a custom one but it still doesn't do anything. Here's my elements.xml. I really don't know how to solve this

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
      <CustomAction
             Id="Ribbon.ContextualTabs.TiedMode.Home.Share"      
             Location="CommandUI.Ribbon"
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Share.Controls._children">
                <Button Id="Ribbon.ContextualTabs.TiedMode.Home.Share.FtOTP"
                  Sequence="15"
                  Command="ShowFtOTP"
                  LabelText="Feuille de temps par OTP"
                  Alt="Feuille de temps par OTP"           
                  TemplateAlias="o1"/>         
            </CommandUIDefinition>     
          </CommandUIDefinitions>
         
          <CommandUIHandlers>
            <CommandUIHandler Command="ShowFtOTP" CommandAction="javascript:alert('Hello');"/> 
          </CommandUIHandlers>
         
        </CommandUIExtension>
      </CustomAction>
    </Elements>

    Tuesday, March 1, 2011 4:55 PM

Answers

  • Funny how things work out, I delete my feature + element in my project, recreate the whole thing, paste this code in the new element and BANG it works...

    Never know why it didn't work before

    • Marked as answer by Jim Corbin Wednesday, March 2, 2011 3:34 AM
    Tuesday, March 1, 2011 6:41 PM