Tag Info

Hot answers tagged

1

It is a two step process. The Location="CommandUI.Ribbon.DisplayForm" of CustomAction specifies that a button will be added to Display form. And Location="Ribbon.ListForm.Display.Manage.Controls._children"> of CommandUIDefinition specifies that it will be added to the Manage tab of the Display form. Full Example: <CustomAction ...


1

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.


1

The problem with your hide custom action is that the Rights attribute says that the custom action must be active for every user having the ViewListItems permission, even if they have further permissions (like EditListItems) as well. AFAIK, there is no declarative way to restrict the custom action using sime kind of exclusive OR (XOR), for example, for ...


1

If the list contains only one content type then in the CustomAction you need to define following three properties: RegistrationType="ContentType" RegistrationId="YourContenttype" Location="CommandUI.Ribbon.ListView" In the CommandUIHandlers, there is EnabledScript attribute which helps in enabling and disabling a button. You can refer to an .js file which ...


1

CommandUIHandler has not only Command and CommandAction attributes but also EnabledScript attribute. It may contains javascript function returning true/false. You may use javascript CSOM to get content type of the item(s) and enable/disable your button. Hiding button completely is different story and is not usual in SP. <CommandUIHandler ...


1

It seems your using custom CSS in your site, which is why you have a weird behavior, use developer tools in your browser and track what custom css might be causing it. Try to remove snippets of your custom CSS and see what was making it behave that way. You might not know it by now, but your CSS might be breaking other areas in the site you haven't seen yet. ...


1

I'm not sure if this solution is possible in SPD. But in xml definition you can use EnabledScript parameter in CommandUIHandler, where you can put javascript code and check if specific page/list/view is loaded. link to similar answer Example: <CommandUIHandler Command="Ribbon.ListItem.CustomGroup.Controls.BtnSayHello.Command" ...



Only top voted, non community-wiki answers of a minimum length are eligible