I have the following custom action definition:


The location is defined as "CommandUI.Ribbon.ListView" and this displays the custom action button on the ribbon when the list is displayed.

But when I click on a list item the tab and button are also displayed on the DisplayFormToolbar. I have a separate feature defined that adds a custom button to the DisplayForm for the list item.

In Visual Studio, I also see a squiggly line underneath the "CommandUI.Ribbon.ListView" and an error when I hover over it that says:

The 'Location' attribute is invalid - The value "CommandUI.Ribbon.ListView" is invalid according to its datatype. 'http://schemas.microsoft.com/sharepoint/:CustomActionLocation' The Enumeration constraint failed.

How can I display my custom action only on the Ribbon for the list view and not on the ribbon for the list item?

2 Answers 2


The location attributive "CommandUI.Ribbon.ListView" will make the button appear in List view only. Its CommandUI.Ribbon.DisplayForm which shows it in Display form. You have perhaps some old artifact in the site. Try it on a new site collection and see what happens.

  • That's not what I am seeing. I have tried retracting and redeploying and it with the location set to "Command.Ribbon.ListView" I am seeing the tab and custom action button on both the list view and the display form for the item. I have also tried IIS reset on the farm before redeploying. Feb 24, 2015 at 14:31

In order to update the custom action I believe you need to iterate the version number of the feature the action is deployed in. To do this, double click the feature, click the Manifest tab, click Edit at the bottom, add the attribute Version="" or iterate an already existing version attribute. Make sure the attribute is with an uppercase V or it won't deploy.

I'm not 100% sure this is needed but it was the only way I managed to get it to work. It did not work to just redeploy, or by using Copy to SharePoint root with CKS-dev and reactivating etc.

Your Answer

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

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