Question

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 ?

Was it helpful?

Solution 2

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 .

OTHER TIPS

To 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>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top