using (DispatchObject soObject = new DispatchObject(pvx.InvokeMethod("NewObject", "SO_Invoice_bus", oSS.GetObject()))) { soObject.InvokeMethod("nSetKeyValue", new object[] { "InvoiceNo$", strRefNumber }); int rt = (int)soObject.InvokeMethod("nFind"); if (rt > 0) { var dta = new object[] { "InvoiceNo$", "lineitem$" }; int val = (int)soObject.InvokeMethodByRef("nGetRecord", dta); } var invoiceNo = soObject.GetDataObject("InvoiceNo$"); }
I was able to get the header details based on the order number. But how to read the line items for a specific order without using a loop to read all line items for every order?