dimanche 7 décembre 2014

Unable to add custom action in Ribbon.PublishTab.Workflow group



I have a Pages library in which I want to place the custom action to start workflow on the page. The action simply redirects to the initiation form of workflow.


My XML code for custom action is as per below:



<Elements xmlns="http://ift.tt/sQmbje">
<CustomAction Id="D7D4B708-783C-4221-8798-6A465C614B57.StartWfs"
RegistrationId="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39"
RegistrationType="ContentType"
Location="CommandUI.Ribbon"
Title="Start workflow"
Description=""
Sequence="1000">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.PublishTab.Workflow.Controls._children">
<Button Id="Lofbergs.DocsStartWFEditMode"
Image16by16="/_layouts/15/Enhancement/Images/Approval_16_by_16.jpg"
Image32by32="/_layouts/15/Enhancement/Images/Approval_32_by_32.jpg"
LabelText=""
Command="DocsStartWFEditMode"
Sequence="10000"
TemplateAlias="o2"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="DocsStartWFEditMode" CommandAction="javascript:function StartWorkflow()
{
var url = _spPageContextInfo.webAbsoluteUrl + '/_layouts/15/BI.Lofbergs.Enhancement-1/Pages/StartWorkflow.aspx?itemId={SelectedItemId}&amp;listId={ListId}&amp;Source={Source}';
window.location.href = url;
}
StartWorkflow();">
</CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>


However, I am not getting the custom action displayed in the PUBLISH tab of the page. What am I missing?








0 commentaires:

Enregistrer un commentaire