locked
Task Due date in SharePoint 2013 RRS feed

  • Question

  • Hi All,

    we have an issue where we want some customization or possible turn around solution on SharePoint 2013. i want to know that if we are allocating any Task to any user then we have Start Date & Due Date in Task Form. Here what i want that automatically, after 2 Days, Due date column should be freezes/locked (No more changes in that). And if we want to change Due date then can only change 2 times & if we want to change again Due date as 3rd time then it should not allow to change at all & require some kind of approval from Management.

    Thursday, December 18, 2014 8:25 AM

Answers

  • Hello,

    For the limited number of modification of the due date, I would use an event receiver on "itemupdating"  with this kind of logic

    If (Properties.ListItem[«Due Date»] != Properties.AfterProperties[«Due Date»]) //modification of the date

    check the number of modification, if less than 3 , increment the number and continue, if 3 set

    Properties.AfterProperties[«Due Date»]) =Properties.ListItem[«Due Date»]

    here some info about creating event recivers :http://msdn.microsoft.com/en-us/library/gg252010(v=office.14).aspx (for 2010 but the same for 2013)


    Best regards, Christopher.
    Blog | Mail
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
    Why mark as answer?

    Thursday, December 18, 2014 8:57 AM
    Answerer
  • Hi,

    Regarding the 2 Days issues, you can do it with a synchronous event receiver [itemupdating].

    What you have to do is:

    • check if the creation date + 2 < now
    • set the afterproperties for DueDate to the beforeproperties value


    Best Regards,
    Frederic


    Thursday, December 18, 2014 8:40 AM

All replies

  • Hi,

    Regarding the 2 Days issues, you can do it with a synchronous event receiver [itemupdating].

    What you have to do is:

    • check if the creation date + 2 < now
    • set the afterproperties for DueDate to the beforeproperties value


    Best Regards,
    Frederic


    Thursday, December 18, 2014 8:40 AM
  • Hello,

    For the limited number of modification of the due date, I would use an event receiver on "itemupdating"  with this kind of logic

    If (Properties.ListItem[«Due Date»] != Properties.AfterProperties[«Due Date»]) //modification of the date

    check the number of modification, if less than 3 , increment the number and continue, if 3 set

    Properties.AfterProperties[«Due Date»]) =Properties.ListItem[«Due Date»]

    here some info about creating event recivers :http://msdn.microsoft.com/en-us/library/gg252010(v=office.14).aspx (for 2010 but the same for 2013)


    Best regards, Christopher.
    Blog | Mail
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
    Why mark as answer?

    Thursday, December 18, 2014 8:57 AM
    Answerer
  • Thanks to all of you. Got solution.

    Let me implement this & if still there will be any issue then will post it.

    Thank you Fredric & Christopher :)

    Thursday, December 18, 2014 9:45 AM