Hi,
Someone has already created timesheet line by code. The record is created but I don't see the result in my form. Maybe I forgot something in my code :
TSTimesheetTable tsTimesheetTable = TSTimesheetTable::find("XXXXXXXXX");
TSTimesheetLine tTimesheetLine;
tTimesheetLine.ProjId = "YYYYYYYYY";
tTimesheetLine.TimesheetNbr = tsTimesheetTable.TimesheetNbr;
tTimesheetLine.ProjPeriodTimesheetWeek = tsTimesheetTable.RecId;
tTimesheetLine.ProjectDataAreaId = curext();
tTimesheetLine.initValue();
if (tTimesheetLine.validateWrite())
{
tTimesheetLine.insert();
TSTimesheetLineWeek::loadFromLine(tTimesheetLine, NoYes::No);
}
Thanks in advance
*This post is locked for comments