Change Timesheet Status by code

Jan 8, 2009 at 9:19 AM
The source code works perfectly. Congratulations, good job ;)

I'm a developer and now i'm working with VS2005 interactuating with EPM PSI's...
I learned a lot about EPM and Project Server, but i've got a lot of doubts and in Internet I don't find all the information that I would like to found...
Now, I've got this concrete doubt:
When i reject a task in tasks's Updates (in Approvals PWA) i want that simultaneously the system recall the timesheet that is associated to the task....
I found the event, but when i change the value of TS_STATUS_ENUM the system fall down (and the same happens when i call to the QueueRecallTimesheet Method... )
So, this is my question: How i could change the value of  TS_STATUS_ENUM  without any issues ¿?
This is a little porcion of the code i developed  (The green code is where thse system fall down...)


(tDS.Headers[0].TS_STATUS_ENUM == (byte)Microsoft.Office.Project.Server.Library.TimesheetEnum.Status.Submitted || tDS.Headers[0].TS_STATUS_ENUM == (byte)





    tDS.Headers[0].TS_STATUS_ENUM = (byte)Microsoft.Office.Project.Server.Library.TimesheetEnum.Status.InProgress;
Guid jobGuid = Guid.NewGuid();
timesheet.QueueRecallTimesheet(jobGuid, tDS.Headers[0].TS_UID);



I'll be very grateful if you could help me...
Thank for read this..