.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

Programmatically Enable Item Scheduling in SharePoint 2010

Posted By:Vijai Anand. R       Posted Date: May 14, 2011    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we will be seeing how to enable item scheduling in SharePoint 2010.

Go to Shared Documents=> Library Settings => General Settings => Manage Item Scheduling.


Programmatically enable scheduling of items in the list:


using System.Collections.Generic;

using System.Linq;

using System.Text;

using Microsoft.SharePoint;

using Microsoft.Office.DocumentManagement.MetadataNavigation;

using System.Reflection;


namespace EnableItemScheduling


    class Program


        static void Main(string[] args)


            using (SPSite site = new SPSite("http://serverName:1111/"))


                using (SPWeb web = site.RootWeb)


                    SPList list = web.Lists.TryGetList("Shared Documents");

                    list.EnableModeration = true;

                    list.EnableMinorVersions = true;


                    typeof(Microsoft.SharePoint.Publishing.ScheduledItem).GetMethod("RegisterSchedulingEventOnList", BindingFlags.Static | BindingFlags.NonPublic).Invoke(null, new object[] { list });






 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

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