.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Creating Custom Actions Menu for Specific Lists in SharePoint

Posted By:Sunil Yadav       Posted Date: May 24, 2010    Points: 10    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article i will explain how we can create a custom action menu particular to a list rather than on all list types.

Method 1.

Create a custom content type by inheriting from any one of the standard Windows SharePoint Services content types.

Make sure that ID of your custom content type should be RegistrationId of the customaction in the element file tag.Also make sure that the RegistrationType in CustomAction tab is set to ContentType.

Create and deploy feature.

Create a list which will be using the custom content type that you have created above.

For more info: http://msdn.microsoft.com/en-us/library/ms473643.aspx

Method 2.

Create a feature as shown below:


Create a Elements.xml as shown below:

    Elements xmlns="http://schemas.microsoft.com/sharepoint/" Id="0A9C0CE0-7EAE-47c3-8209-54A872250E08?>

Now create a folder named as "CustomListAction" and add
Allitems.aspx,DispForm.aspx,EditForm,NewForm and Schema.xml.

    Note: The ListTemplate Name and folder name should be same.

Copy Feature.xml,Elements.xml and CustomListAction folder in CustomListActionFeature folder
and install in Feature directory in 12 hive Using stsadm command.

    stsadm -o installfeature -filename CustomListActionFeature\Feature.xml

    stsadm -o activatefeature -name CustomListActionFeature -url http://mossportal/

    and finally do iisreset

Now create List from newly installed ListTemplate thats it !!!!!.

 Subscribe to Articles


Further Readings:

Author: bijayani         Company URL: http://www.dotnetspark.com
Posted Date: June 01, 2010


I am sharing a tips with you.

When we want to add a custom button to a list toolbar we can add it by using a feature.But when we are activating the feature it will be apply to the scope secified, so all the lists present inside the scope will have a button added to it's toolbar. But if we want to add the button to a particular list then we need to specify the content type ID of the list.

Hope you find this tips useful and of assistance. For more detail, please visit: http://www.mindfiresolutions.com/How-to-add-a-menu-button-to-a-specific-sharepoint-list-toolbar-851.php

Author: Sunil Yadav         Company URL: http://www.dotnetspark.com
Posted Date: June 01, 2010


Thanx for your reply as you go through my code i have mention ListTemplate Type="1111" which does not falls in any of the predefined scope.

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend