Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

2 Answers 2

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>
share|improve this answer
    
Thanks, but How do find custom actin of list in code? –  ar.gorgin Apr 14 '12 at 4:39
    
Here is how to access Custom Actions using code stackoverflow.com/questions/1462899/… –  Per Jakobsen Apr 14 '12 at 8:07
add comment
up vote 1 down vote accepted

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 .

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.