Hi,
I need to add custom action to view ribbon in the tasks list. The problem is only with tasks list. With custom list works everything fine.
I tried to add custom action to tasks list using Designer, but i don't see my button.
In the internet I found a way how add custom action to tasks list using Visual Studio, but the action was added to all tasks list. I used this code:
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"><CustomAction Id="ActionButton" RegistrationId="171" RegistrationType="List" Location="CommandUI.Ribbon" Title="Add a Action button for tasks list"><CommandUIExtension><CommandUIDefinitions><CommandUIDefinition Location="Ribbon.Tasks.Actions.Controls._children"><Button Id="Ribbon.Tasks.Actions.ActionButton"
Alt="Perform an action for task items."
Sequence="10"
Command="ActionButtonCommand"
LabelText="Action Button"
TemplateAlias="o1"
Image32by32="/_layouts/15/xxx/report_32_32.png"
Image16by16="/_layouts/15/xxx/report_16_16.png" /></CommandUIDefinition></CommandUIDefinitions><CommandUIHandlers><CommandUIHandler Command="ActionButtonCommand" CommandAction="javascript:alert('Whoa..! You performed an action!');"></CommandUIHandler></CommandUIHandlers></CommandUIExtension></CustomAction></Elements>Please advice!
##########################
SOLUTION:
In my case I used RegistrationId with limitation to ContentType.
from MSDN forum...