I add custom action to a sharepoint list actios menu for all list .
I want get custom actions that define for a special list in VS.
How to get custom action ?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityTo limit the Custom action to a specific type of list you need to specify RegistrationType and RegistrationId like this:
<!-- Microsoft.SharePoint.StandardMenu : ActionsMenu : Site Actions menu of document library -->
<CustomAction Id="CustomWareCustomActions.Microsoft.SharePoint.StandardMenu.CustomList.ActionsMenu"
RegistrationType="List"
RegistrationId="101"
GroupId="ActionsMenu"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="CUSTOMWARE - Microsoft.SharePoint.StandardMenu : ActionsMenu">
<UrlAction Url="http://www.customware.net/success"/>
</CustomAction>
I find , I use this code for get custom action of list .:)
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists[MyList];
SPUserCustomActionCollection actions =list.UserCustomActions;
This link is useful for me .