I created a custom inbound service to create timesheets. Everything works fine besides one attribute I have to populate. This is my query:
TSTimesheetTable → TSTimesheetLine → TSTimesheetLineWeek
My problem is that I have to populate attribute/field [ProjPeriodTimesheetWeek]. In order to do that I need a PeriodId (got it) and the DayFrom (have this in the line week). My problem is that I don’t know how to populate this value since I can’t access the child entity (TSTimesheetLineWeek) when populating the TSTimesheetLine entity. The code below shows the way I would like to populate the ProjPeriodTimesheetWeek:
Is there any way to insert the parent entity (TSTimesheetLine) without the ProjPeriodTimesheetWeek and
update the parent entity when processing the child entity?
update the entity after processing all child entities?
Is there a better way?
I hope this makes sense. Thanks for the help!!!