none
Custom ribbon button does not show for a Tasks list RRS feed

  • Question

  • I created a simple app using Visual Studio 2012 to add a custom ribbon button for a tasks list. After deploying the app to the SharePoint online, the button does not appear on the ribbon. The exact same button gets displayed properly when added to the ribbon for a custom list.  The elements file with the location of the button gets generated, so I can't imagine it would be wrong, but just in case, this is what I have:

    <CustomAction Location="CommandUI.Ribbon"....

    ....

    <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">...

    Any help is greatly appreciated.

    One more thing, if I add this button using SharePoint Designer 2013, the button does not get displayed either. I have a feeling it might be problem with the Tasks list?

    Thanks

    Tuesday, January 14, 2014 6:24 AM

All replies

  • What values did you use for RegistrationType and RegistrationId in your Elements.xml? If you do the following, the button should appear on all types of lists:

    RegistrationType="ContentType"
    RegistrationId="0x01"


    Danny Jessee
    MCPD - SharePoint Developer 2010
    MCTS - SharePoint 2010, Configuring
    dannyjessee.com/blog

    Tuesday, January 14, 2014 1:16 PM
  • Hi Danny,

    The button needs to be displayed only for one specific list. And as I mentioned, the elements file for the ribbon button was generated by VS, here is the content:

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
        <CustomAction Id="02aa4c3b-bb73-4dfa-989c-d63a9591dcee.RibbonCustomAction" RegistrationType="List" RegistrationId="{$ListId:Lists/Projects;}" Location="CommandUI.Ribbon" Sequence="10001" Title="Create Project Site"> 
            <CommandUIExtension> 
                <CommandUIDefinitions> 
                <CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children"> 
                    <Button Id="Ribbon.ListItem.Actions.RibbonCustomActionButton" Alt="Create Project Site" Sequence="100" Command="Invoke_RibbonCustomActionButtonRequest" LabelText="Create Project Site" TemplateAlias="o1" Image32by32="_layouts/15/images/placeholder32x32.png" Image16by16="_layouts/15/images/placeholder16x16.png" /> 
                </CommandUIDefinition> 
                </CommandUIDefinitions> 
                <CommandUIHandlers> 
                    <CommandUIHandler Command="Invoke_RibbonCustomActionButtonRequest" CommandAction="~remoteAppUrl/Pages/Default.aspx?{StandardTokens}&SPListItemId={ItemId}&SPListId={ListId}"/> 
                </CommandUIHandlers> 
            </CommandUIExtension > 
        </CustomAction> 
    </Elements>

    If the same button is added for a custom (not a Tasks) list, the button shows up fine.
    Thanks

    Wednesday, January 15, 2014 5:21 AM