1

I try to approve non project time in a console application with the ApproveNonProjectTime method (http://msdn.microsoft.com/en-us/library/websvctimesheet.timesheet.approvenonprojecttime%28v=office.12%29.aspx).

My code is very simple :

class Program
{
    const string projectServerUri = "http://morpheus-sp/pwa/";
    const string resourceServicePath = "_vti_bin/psi/Timesheet.asmx";

    static void Main(string[] args)
    {
        TimesheetWebSvc.TimeSheet timesheetSvc = new TimesheetWebSvc.TimeSheet();
        timesheetSvc.Url = projectServerUri + resourceServicePath;
        timesheetSvc.Credentials = CredentialCache.DefaultCredentials;

        timesheetSvc.ApproveNonProjectTime(new Guid[] { new Guid("D6909043-18A7-4FF6-83BB-67EFDF17A279")}, null);        
    }
}

When I execute it I have this error message :

System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralItemDoesNotExis

However I took the TS_LINE_UID directly in my DB and its status is Pending Approval.

Have you a solution ?

Thank you, Justin

0 Answers0