Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

ApproveNonProjectTime method GeneralItemDoesNotExist error

$
0
0

Hello everybody,

I try to approve non project time in a console application.

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 : GeneralItemDoesNotExist

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

Have you a solution ?

Thank you,
Justin


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>