HideCustomAction Element

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Hides an existing action that is implemented by default within the framework of Windows SharePoint Services Features, or within another custom action.

Definition

<HideCustomAction
  GroupId = "Text"
  HideActionId = "Text"
  Id = "Text"
  Location = "Text">
</HideCustomAction>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

**GroupId**

Optional **Text**. Identifies an action group that contains the action, for example, `"SiteAdministration"`.

**HideActionId**

Optional **Text**. Specifies the ID of the custom action to hide, for example, `"DeleteWeb"`. See Default Custom Action Locations and IDs for a list of the default custom action IDs that are used in SharePoint Foundation. For more information about hiding custom action IDs, see the **Remarks** section.

**Id**

Optional **Text**.Specifies the ID of this hide custom action element, for example, `"HideDeleteWeb"`.

**Location**

Optional **Text**. Specifies the location of the custom action to hide, for example, `"Microsoft.SharePoint.SiteSettings"`. See Default Custom Action Locations and IDs for a list of the default custom action locations that are used in SharePoint Foundation.

Child elements

None

Parent elements

Elements

Remarks

Note that HideCustomAction IDs are not limited to specific default SharePoint Foundation custom actions. You can also hide custom actions that you create yourself when you write your own features. This means that for any CustomAction ID available in SharePoint Foundation, you can have a corresponding HideCustomAction ID.

To locate custom action IDs, search in Windows File Explorer for the term "CustomAction." By default, these are located in the folder %ProgramFiles%\\Common Files\\Microsoft Shared\\web server extensions\\15\\TEMPLATE\\FEATURES. Here you will find all of the features that contain specific CustomActions that are related to your specified feature. Depending upon your requirement, you may inspect the desired feature folder and check the underlying XML file to note the CustomAction IDs, GroupIDs and Locations for that feature. Furthermore, you can use the same information to write your HideCustomAction elements as required. Additionally, you can refer to the information listed in the WSS 3.0 SDK on the page titled How to: Add Actions to the User Interface.

Different actions may require using different CustomAction attributes to identify the menu where the custom menu item is placed. You may also need to specify other parameters for the action, for example, a version, user permissions required to perform the action, or placement in relation to existing actions in the menu. Similarly different HideCustomAction attributes may require different HideActionIds based upon which CustomAction you are trying to hide.

See also