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

Update Actual Value in ActualsRow and QueueUpdateTimesheet error

$
0
0

Hello,

I try to update the actual value with this code :

DataSet vacationRequestDataSet = databaseSvc.SelectVacationRequestByVacationRequestGroupId(VacationRequestGroupId);

TimesheetWebSvc.TimesheetDataSet timesheetDataSet = timesheetSvc.ReadTimesheet(TimesheetId);

foreach (DataRow dataRow in vacationRequestDataSet.Tables[0].Rows)
{
    TimesheetWebSvc.TimesheetDataSet.ActualsRow actualsRow = timesheetDataSet.Actuals.FindByTS_LINE_UIDTS_ACT_START_DATE(TSLineId, dataRow.Field<DateTime>("StartDate"));
    actualsRow.SetField<int>("TS_ACT_VALUE", 0);

    timesheetSvc.QueueUpdateTimesheet(Guid.NewGuid(), TimesheetId, timesheetDataSet);
}

I don't know if I use the correct method but I get this error :

TimesheetIncorrectMode (3204). Details: id='3204' name='TimesheetIncorrectMode' uid='c0aa23f2-8777-4f1f-bc15-7e74e03cec85' mode='0'.

PSError: TimesheetIncorrectMode (3204)
An incorrect state change request has been made.  Project Server could not process your request. The existing state of the Timesheet is:  (please refer to the documentation for what the Timesheet state number means)

I have already installed this hotfix : http://support.microsoft.com/kb/2687354

Have you an idea ?

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>