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

Updating edited actuals for existing timesheet

$
0
0

Hey guys I managed to retrieve the actuals from an existing timesheet and edit some of the actuals within it.  The problem is when I try to update the timesheet with these actuals.  No exception is thrown.  And the actuals are NOT updated to the timesheet in Project server. 

            ts.TimesheetDataSet timesheetDs = timeSheetSvc.ReadTimesheet(tsUID);

            for(int i=0;i < Dates.Count; i++)
            {
                try
                {
                    ts.TimesheetDataSet.ActualsRow actual = timesheetDs.Actuals.FindByTS_LINE_UIDTS_ACT_START_DATE(tsLineUID, Dates[i]);
                    actual.BeginEdit();
                    actual.TS_ACT_START_DATE = Dates[i];
                    actual.TS_ACT_FINISH_DATE = Dates[i];
                    actual.TS_ACT_VALUE = ActualValues[i];
                    actual.EndEdit();
                }
                catch(Exception){
                    ;
                }
            }

             //prepare Timesheet line
             Guid jobUID = Guid.NewGuid();
             timeSheetSvc.PrepareTimesheetLine(tsUID, ref timesheetDs, new Guid[] { tsLineUID });
             timeSheetSvc.QueueUpdateTimesheet(jobUID, tsUID, timesheetDs);

Anyone have an idea as to the problem?






Viewing all articles
Browse latest Browse all 5347

Trending Articles



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