programmatically update project server 2013 timesheet


  • Hi

    I've been tasked with writing an application (console app) that periodically gets data from our timesheet system and push those data into Ms Project Server 2013 timesheet for each individual user.

    The service account that this console app will use will have administrator rights on Sharepoint and project Server.

    So programmatically, how can I enter timesheet entries for each individual user?

    Using CSOM? PSI?

    Please provide example.

    Thanks in advance

    Selasa, 03 Februari 2015 06.06

Semua Balasan

  • Before you start coding, does your timesheet system have the GUIDs for the relevant tasks in it? Do the names of the People in the timesheet system match resource names in Project Server or does it have Resource GUIDs in?

    What happens if someone creates a new task or wants to assign time to a valid task that's not already in Project? Are the tasks in the Timesheet imported from Project Server at the beginning of the week or not?

    There a raft of process issues that need resolving first.

    I think there is some sample code for this on MSDN in the Project SDK, but this is not a quick and easy task you accepted!

    The basics of copying one timesheet line are not too bad, but its the process gotchas that will chew thru time and complications.

    If your timesheet system is there to basically record that people have done their 40h for the week then better to use Project's timesheet system then roll up the hours and copy to the other timesheet system.

    Rod Gill
    Author of the one and only Project VBA Book

    Rabu, 04 Februari 2015 00.37
  • I'm facing thesame task. As far as I managed to learn, it is possible to do via CSOM according to this MS article:

    It will be crucial to maintain relations between tasks in the "other" system and PPM. Probably by adding custom columns to tasks and/or resources in PPM.

    I hope that somebody with greater experience will add some examples.

    Best Regards Wojciech Wróblewski Visit my blog (in polish):

    Rabu, 04 Februari 2015 13.06
  • Hi Wojciech

    Our timesheet system is just a simple Administrative task system of Leaves (annual leave, sick leave, LSL, ...). All project task related items is in PPM, so which is why the console app needs to copy those Leaves into PPM.

    Through CSOM, I can update my PPM Timesheet, because I provide my credentials when creating the ProjectContext object.

    The hurdle I am having is how to update other people's PPM Timesheet without using their credentials (eg, without knowing their password).

    Hope someone can shed some light on this task



    Rabu, 04 Februari 2015 22.26
  • maybe try to update assignments instead. It depends on how exactly do you record leaves (project or administrative tasks).

    Best Regards Wojciech Wróblewski Visit my blog (in polish):

    Kamis, 05 Februari 2015 05.12
  • Any update on this?

    I want to update the planned hours in timesheet for administrative task

    Thanks, Parth

    Jumat, 27 Juli 2018 12.33