I am trying to add a custom action to Workflows group in Documents tab of a Custom List. Also, I am adding another action to the Edit Control Block of same list. Below is the code I am trying to add,
<CustomAction
Id="{D61E5C6A-88AF-4370-9D34-C1F8954F1C39}"
RegistrationType="List"
RegistrationId="10001"
ImageUrl="/_layouts/Images/formatmap16x16.png"
Location="EditControlBlock"
Sequence="100"
Title="Custom Action">
<UrlAction Url="http://www.google.com"/>
</CustomAction>
<CustomAction
Id="{D5FBFC13-59D2-4846-9326-E101C9E6BDB8}"
RegistrationType="List"
RegistrationId="10001"
Location="CommandUI.Ribbon.ListView"
Sequence="5"
Title="Custom Action">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Documents.Workflow.Controls._children">
<Button
Id="{857E70AF-CD75-4e7d-A81B-2D54D2AC9C18}"
ToolTipTitle="Custom Action"
ToolTipDescription="Custom Action"
Alt="Custom Action"
Sequence="5"
Command="OpenGoogle"
Image32by32="/_layouts/images/availableworkflow.gif"
Image16by16="/_layouts/images/availableworkflow.gif"
LabelText="Custom Action"
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="OpenGoogle" CommandAction="javascript:window.open('http://www.google.com')"> </CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
I can see the custom action in ECB of my custom list, but the custom action in Documents tab does not show up. The same code works if I set the RegistrationId = 101
for other document libraries. It also works if I change the Custom Action location to CommandUI.Ribbon.DisplayForm
and the CommandUIDefinition
to Ribbon.ListForm.Display.Actions.Controls._children
and I can see custom action the Display form. But, I want it in the workflows group of Documents tab.
I don't understand what I am missing.
Location="CommandUI.Ribbon"
instead ofLocation="CommandUI.Ribbon.ListView"