0

I have the below scenario

1) I have a Master Task list and Task list. 2) When the user Adds a Task in Master Task list then the same task should be added next month same date.

For example If i have added a task on 6/04/2013 in Master Task list then Next month 07/04/2013 a New task should be added in Task list. This will repeated every month i.e (08/04/2013-----) irrespective of years.

Below is the link(Timer job for copying list items where i tried same but i was successfully able to copy task list items from one task list to another task list.But not sure how to achieve this. Any help is much appreciated

Thanks, Sandy

0

you would need to have a timer job scheduled daily.

See Deploying Your Timer Job section

In your timer job. Check the item creation of all the items in your master task list

//this portion is for checking items in the Master List
using (SPSite site = new SPSite("URL"))
{
    using(SPWeb web = site.OpenWeb();
    {
       SPList list in web.Lists["MasterTaskList"];
       string todaysDay = System.DateTime.Now.Day;
       foreach(SPListItem item in list.Items)
       {
          string createdDay = item["Created"].ToString().ToDateTime().Day;
          if(createdDay==todaysDay)
          // do the copy the item in the task list here
       }
    }
}
  • by the way @John Chapman, just a questionn i myself dont have enough reputation here can commenting in our own post help us to get reputation points? I'm just wondering i actually sometimes put my comment as an answer since i dont have much reputation – Ranjoe Santos Jun 5 '13 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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