Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Custom actions are defined in XML documents and deployed as part of a Feature.
An XML document that defines custom actions must validate with the schema defined in the file wss.xsd. This file is located on the following path: %ProgramFiles%\\Common Files\\Microsoft Shared\\web server extensions\\15\\TEMPLATE\\XML
.
The CustomActionGroup element contains the core definition for a grouping of custom actions.
The UrlAction element must be used to specify the URL for a custom action. If no action is specified (an error condition), the link is displayed but it is not linked to anything.
Use the HideCustomAction element to hide an existing action that is implemented by default within the infrastructure of Microsoft SharePoint Foundation Features, or within another custom action. For a list of the default custom action IDs, see Default Custom Action Locations and IDs.
The following example shows an XML file whose contents replace default actions in a SharePoint Foundation page with new actions. For a programming task that shows the steps for defining and registering custom actions, see How to: Modify the User Interface Using Custom Actions.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomActionGroup
Id="PortalAnalytics"
Location="Microsoft.SharePoint.Administration.ApplicationManagement"
Title="Usage Reporting"
Sequence="50" />
<CustomAction
Id="ManageAnalytics"
GroupId="PortalAnalytics"
Location="Microsoft.SharePoint.Administration.ApplicationManagement"
Sequence="10"
Title="Configure usage reporting" >
<UrlAction Url="_layouts/SpUsageConfig.aspx"/>
</CustomAction>
<HideCustomAction
Id="HideWssSiteCollectionUsage"
HideActionId="SiteCollectionUsage"
GroupId="SiteCollectionAdmin"
Location="Microsoft.SharePoint.SiteSettings" />
<HideCustomAction
Id="HideWssWebUsage"
HideActionId="WebUsage"
GroupId="SiteAdministration"
Location="Microsoft.SharePoint.SiteSettings" />
<CustomAction
Id="PortalSiteUsage"
GroupId="SiteCollectionAdmin"
Location="Microsoft.SharePoint.SiteSettings"
Rights="ViewUsageData"
Sequence="30"
Title="Site usage data">
<UrlAction Url="_layouts/SpUsageSite.aspx" />
</CustomAction>
<CustomAction
Id="PortalWebUsage"
GroupId="SiteAdministration"
Location="Microsoft.SharePoint.SiteSettings"
Rights="ViewUsageData"
Sequence="30"
Title="Web usage data">
<UrlAction Url="_layouts/SpUsageWeb.aspx" />
</CustomAction>
</Elements>
Events
Microsoft 365 Community Conference
May 6, 2 PM - May 9, 12 AM
Skill up for the era of AI at the ultimate community-led Microsoft 365 event, May 6-8 in Las Vegas.
Learn more