Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1083719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:28:17+00:00 2026-05-16T22:28:17+00:00

Edit: Updated with input from Omlin I am attempting to add a custom button

  • 0

Edit: Updated with input from Omlin

I am attempting to add a custom button to the ribbon. I want the button associated with a custom list named “Products”. I am able to get the button to show for a built-in list, such as a Shared Documents, but not the custom products list.

Below are examples of my code working with an existing list and not working with the custom list. I’ve also attached links to the working and non-working code that create the custom list and the ribbon button. These solutions assume that you have a site created at http://intranet.contoso.com. You will probably need to change Site URL of the project to get the code to run.


Working with and built-in list (Shared Documents):

Elements XML:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
       <CustomAction
              Id="CustomRibbonTab"
              Location="CommandUI.Ribbon.ListView"
              RegistrationId="101"
              RegistrationType="List"
              Title="My Custom UI"
              Sequence="5"
              >
              <CommandUIExtension>
                     <CommandUIDefinitions>
                           <CommandUIDefinition Location="Ribbon.Documents.New.Controls._children">
                                  <Button
                                         Id="Ribbon.Items.New.RibbonTest"
                                         Alt="Test Button"
                                         Sequence="5"
                                         Command="Test_Button"
                                         LabelText="Click me!"
                                         Image32by32="/_layouts/images/ribbon_blog_32.png"
                                         Image16by16="/_layouts/images/ribbon_blog_16.png"
                                         TemplateAlias="o1"
                                         />
                           </CommandUIDefinition>
                     </CommandUIDefinitions>
                     <CommandUIHandlers>
                           <CommandUIHandler Command="Test_Button"
                                                         CommandAction="javascript:alert('I am a test!');">

                           </CommandUIHandler>
                     </CommandUIHandlers>
              </CommandUIExtension>
       </CustomAction>
</Elements>

Working Example
Working Example

Full Visual Studio Solution:
http://employees.claritycon.com/pwalke/blogs/working.zip


Not Working

Elements XML: I changed 2 lines from the above code.
Line 28: Associate the button with the custom products list, ID 10001, specified in the list template of the zipped code below.

RegistrationId="10001"

Line 85: Tell SharePoint to place the item within the Items menu.

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

Screenshot – I would have expected the custom ribbon button to be added to the left of New Item.
Not Working

Full Visual Studio Solution:
http://employees.claritycon.com/pwalke/blogs/notworking.zip

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:28:18+00:00Added an answer on May 16, 2026 at 10:28 pm

    I was able to resolve this issue. Thanks to omlin for getting me part of the way there.

    This was a 2-part issue.

    1:
    As suggested by omlin, I changed

    Ribbon.Items.New.Controls._children 
    

    to

    Ribbon.ListItem.New.Controls._children
    

    2: I had to change the schema.xml’s toolbar declarations from

    <ToolBar />
    

    to

    <Toolbar Type="Regular"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.