none
Setting start and finish date for project programatically in project server 2010 RRS feed

  • Question

  • Hi,

    I was trying to create project programatically in project server 2010.I was able to create the project ,but facing issues in giving the start and finish date programatically. I gave explicit value for Start Date and Finish Date using PSI . projectrow.PROJ_INFO_START_DATE = (DateTime)projects[i].StartDate; //01-04-2011 projectrow.PROJ_INFO_FINISH_DATE = (DateTime)projects[i].EndDate; //01-04-2012 But in MSP_Projects the PROJ_INFO_FINISH_DATE is taking value as PROJ_INFO_START_DATE.

    Please help me..


    Lovely
    Tuesday, March 8, 2011 12:28 PM

Answers

  • Thanks a lot Barbara.

    Actually from the initial project creation itself we need the correct dates to be reflected at the project level, so we have programatically created a summary task along with project creation and set its dates as the required project start date and end date, so that the it will reflect correctly at the project level.

     

    Thanks.


    Lovely
    Friday, March 11, 2011 5:10 AM

All replies

  • Hi,

    I am quite sure it is similar to use the client. Project does calculate either Project Finish Date, if Schedule from is set to Project Start Date, and Project Start Date, if Schedule from is set to Project Finish Date. At the moment you insert tasks (programmatically), the second date will be calculated based on duration of inserted tasks. If PROJ_INFO_FINISH_DATE = PROJ_INFO_START_DATE, I assume that you haven't inserted any tasks so far? (Open a new blank project in client, and you will see tha same)

    Regards
    Barbara

     

    Tuesday, March 8, 2011 12:35 PM
    Moderator
  • Thanks a lot Barbara.

    Actually from the initial project creation itself we need the correct dates to be reflected at the project level, so we have programatically created a summary task along with project creation and set its dates as the required project start date and end date, so that the it will reflect correctly at the project level.

     

    Thanks.


    Lovely
    Friday, March 11, 2011 5:10 AM
  • Hi Lovely,

    great that it is working now.

    Good luck!
    Barbara

    Friday, March 11, 2011 5:56 AM
    Moderator