Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Custom action in Ribbon.PublishTab always disabled

$
0
0

I have a custom action which I want to place at the PUBLISH tab of the page. To do so, I have a following code for custom action.

<CustomAction Id="D7D4B708-783C-4221-8798-6A465C614B57.StartWfsEditMode"
            Location="CommandUI.Ribbon"
            Title="Start"
            Sequence="10005"><CommandUIExtension><CommandUIDefinitions><CommandUIDefinition Location="Ribbon.PublishTab.Workflow.Controls._children"><Button Id="Lofbergs.DocsStartWFEditMode"
              Image16by16="/_layouts/15//Images/Approval_16_by_16.jpg"
              Image32by32="/_layouts/15//Images/Approval_32_by_32.jpg"
              LabelText="Start Workflow"
              Sequence="2"
              Command="StartWorkflow1"
              TemplateAlias="o1"/></CommandUIDefinition></CommandUIDefinitions><CommandUIHandlers><CommandUIHandler Command="StartWorkflow1" CommandAction="javascript:function StartWorkflowEdit()
                      {
                        alert('hello');
                      }
                      StartWorkflowEdit();"></CommandUIHandler></CommandUIHandlers></CommandUIExtension></CustomAction>

The custom action is getting displayed on the tab but it is always disabled for selection. If I remove the Command attribute from the Button tag then it gets enabled.

What am I missing in my code?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>