How to get project start date in project OnCreated event receiver? RRS feed

  • Question

  • Hello everyone,

    I'm developing a Project OnCreated event receiver for Project Server 2010 and need some help.

    I can't find a solution to get the project start date on the OnCreated event.

    Here is some Code that I'm using:

    public override void OnCreated(PSContextInfo contextInfo, ProjectPostEventArgs e)
    	// ... some initialization of ProjectClient (PSI WebService)
    	// Get project data set from working store by projec uid
    	var projectDataSet = ProjectClient.ReadProject(e.ProjectGuid, DataStoreEnum.WorkingStore);
    	var project = projectDataSet[0];
    	DateTime projectStartDate = project.PROJ_INFO_START_DATE; // this line returns always 02.01.2013! even though the user has set 30.04.2013 on the project detail page.

    If I set a breakpoint in the event reciver before it quits even the database shows the date 02.01.2013. When the event receiver has finished the date is 30.04.2013.

    How can I get the project start date in the OnCreated event receiver?

    Thank you in advance.

    Friday, April 26, 2013 8:49 AM