We have an application deployed on SharePoint 2013. Part of the application adds custom items to the ribbons of lists and libraries and the edit control block of list and library items.
This is the element respobsible for adding the edit control block item:
<CustomAction Id="822a4bc9-25d3-4445-9186-248f0b3aa493.CustomSurveyAction"
RegistrationType="List"
RegistrationId="102"
Location="EditControlBlock"
Sequence="10001"
Title="Our App">
<UrlAction Url="~appWebUrl/Pages/Application.aspx?formUrl=/Runtime/Form/Workflows%3FSPSiteURL%3D{HostUrl}&amp;SPListId%3D{ListId}&amp;SPItemId%3D{ItemId}&amp;SPItemUrl%3D{ItemUrl}&amp;Source%3D{Source}" />
</CustomAction>
This is the element responsible for adding the ribbon item
<CustomAction Id="3bbe7d92-645c-41b3-b436-ac89a8241361.CustomSurveyActionR"
RegistrationType="List"
RegistrationId="102"
Location="CommandUI.Ribbon"
Sequence="10001"
Title="Our App">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
<Button Id="Ribbon.ListItem.Actions.CustomSurveyActionRButton"
Alt="Request CustomSurveyActionR"
Sequence="100"
Command="Invoke_CustomSurveyActionRButtonRequest"
LabelText="Request CustomSurveyActionR"
TemplateAlias="o1"
Image32by32="_layouts/15/images/placeholder32x32.png"
Image16by16="_layouts/15/images/placeholder16x16.png" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="Invoke_CustomSurveyActionRButtonRequest"
CommandAction="~appWebUrl/Pages/Application.aspx?formUrl=/Runtime/Form/Workflows%3FSPSiteURL%3D{HostUrl}&amp;amp;SPListId%3D{ListId}&amp;amp;SPItemId%3D{ItemId}&amp;amp;SPItemUrl%3D{ItemUrl}&amp;amp;Source%3D{Source}"/>
</CommandUIHandlers>
</CommandUIExtension >
</CustomAction>
In the above XML, the RegistrationId
is set to 102
, which is the Id for a Surveys. The first, used for ECB custom actions, work and places the item in the ECB of a survey response. However, the second, used for Ribbon custom actions, does not since Surveys don't have ribbons.
Now I've been trying to add the item to the Settings menus of a Survey, but I'm not sure if it's even possible. I found this MSDN entry listing the various Locations and GroupIDs (refer to the Location
and GroupID
attributes of the CustomAction
element). So I tried GroupID="SettingsMenuForSurvey" Location="Microsoft.SharePoint.StandardMenu"
since I'm attempting to add the item to the Survey's Settings menu.
However, when Deploying the application (either via VisualStudio or by Publishing it and uploading it manually) I get one of two errors (depending on which Attributes are present in the XML):
- 'GroupID' attribute is not declared
- 'Location' is invalid - The value 'Microsoft.SharePoint.StandardMenu' is invalid according to its datatype
I also tried a couple of other things and came across this MSDN entry, but it only lists Locations relevant to Ribbons; there is nothing on Surveys.
Does anyone have more information that might help?