I'm trying to add a Business Central [Sales Line] child record to a [Sales Header] parent invoice record in a C# OData program. I know the header record exists because the program has just created it & I can see it in BC, but when I try to add the child record using the binding Document No: 102206 I get an error (see below) that indicates it can't see the header record.
The field Document No. of table Sales Line contains a value (102206) that cannot be found in the related table (Sales Header).
Any thoughts?