I am trying to call the create() method on a web service that I made from the ground up. The query contains two tables. The first table is a parent to the second table. The child table has a "refrecId" field that contains the recId field from the parent table. This is how the two tables are related. The problem I'm having is that the foreign key field (refrecid) in the child table is not populated when I pass the object for the service on the create() method.
I tried creating the records for the parent table, which gives me the recId's for the parent table records. And, then calling Update() to create the records for the child table but, that didn't work.
I know that this is possible in AX since the Sales Order service and Customer service do the same thing with object/sub-object arrangements. For instance, the records in the SalesLine table contain the correct SalesId when a sales order is passed in to the create() method for that service.
Any help would be great.