Update SharePoint list with project finish date on Project.Updated event RRS feed

  • Question

  • Hello,

    I want to update a column in a SharePoint list with the project finish date when a project is updated on Project Server. My OnUpdated event handler is being called ok, but if I change the project start date Project Server runs an asynchronous republishing on the project, and my event handler ends up being called before the finish date is update by the republishing job, so the code writes the "old" finish date on the SharePoint list. The solutions I could think of are:

    1. Identify the republishing job on Project Server queue, pool the queue waiting for it to finish, then read the finish date and update the list item in SharePoint.
    2. Include a custom job on Project Server queue after the republishing job, that reads the finish date and update the list item in SharePoint.

    I don't know if any of the solutions are feasible and how to implement them. Has anyone coded something like this and/or have a better solution?



    • Edited by gbuchoa Tuesday, August 5, 2014 2:15 PM
    Tuesday, August 5, 2014 2:15 PM

All replies

  • I vote for the option 1.

    I did for one of my event handler..Did you try "on published" event?

                projectSvc.QueueUpdateProject(jobUid, SessionUID, projectDss, false);
                //WaitForQueue(q, jobUid);

                jobUid = Guid.NewGuid();
                projectSvc.QueuePublish(jobUid, e.ProjectGuid, false, string.Empty);
                jobUid = Guid.NewGuid()

    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    Monday, August 11, 2014 10:24 AM