I've got an Object Structure with WORKORDER as the top/main object and WPLABOR as the child Object (hierarchy is WORKORDER/WPLABOR) using the WPLABOR relationship (wonum=:wonum and siteid=:siteid). The inbound processing class is set to psdi.iface.app.wo.MaxWOProcess.
I am trying to integrate inbound using this Object Structure in order to add new WPLABOR records to an existing Parent Work Order that has an existing Task Work Order. I am wanting, in the inbound payload, to have the SITEID, WONUM of the Parent WO specified (just to identify the unchanged Parent WO) and on the WPLABOR part of the payload, identify the TASKID for the Task WO. The issue is that when this inbound payload processes, it adds the WPLABOR record, associating it to the Parent WO, not the Task WO. I'm expecting to be able to specify multiple WPLABOR records in a single payload, all adding new WPLABOR, perhaps some will have no TASKID value (in which case the WPLABOR is associated with the Parent WO (i.e. WPLABOR.WONUM is set to the Parent WO WONUM)), and others in the inbound payload will have a valid TASKID vaue (in which case the WPLABOR is associated with the Task WO (i.e. WPLABOR.WONUM is set to the Task WO WONUM)).
I've also tried implementing an inbound Object Structure processing Automation Script, imlementing the beforeMboData() function, but when it tries to set the context Mbo attribute value for WONUM ( ctx.getMbo().setValue("WONUM", taskWONum, MboConstants.DELAYVALIDATION) ), it gets an error indicating that it cannot be updated because it is readonly or part of a primary key.
I guess I was expecting to use the inbound integraiton much like the front end in Work Order Tracking, Plans tab. In the front end, you can add multiple WPLABOR records to the same MboSet on screen, and they could have Task ID empty (associate WPLABOR to Parent WO) or it could be populated with a valid Task ID (associate WPLABOR to Task WO).